fix(ui): ensure consistent switch position in markdown editor (#7492)
Followup to https://codeberg.org/forgejo/forgejo/pulls/7481. Fix a bug reported by @Gusted where the switch would jump ~1px up when switched to preview mode. It was because the switch is always center-aligning to the largest element in the toolbar. With toolbar buttons disappearing, the largest element was the switch itself. By placing it in a box with same height as the buttons we can ensure it can always stay in the same position. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7492 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: 0ko <0ko@noreply.codeberg.org> Co-committed-by: 0ko <0ko@noreply.codeberg.org>
This commit is contained in:
parent
eca57cc3e9
commit
282125e90f
2 changed files with 10 additions and 4 deletions
|
@ -11,7 +11,11 @@
|
|||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
markdown-toolbar .switch .item {
|
||||
.markdown-toolbar-switch {
|
||||
display: flex;
|
||||
height: 30px;
|
||||
}
|
||||
.markdown-toolbar-switch .switch .item {
|
||||
padding: 0.25em 1em;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue