mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-02-23 03:45:47 -05:00
Use flex for switch items (#6544)
[skip ci] no related tests (covered by visual testing only) Followup to https://codeberg.org/forgejo/forgejo/pulls/6459. More specifically, to https://codeberg.org/forgejo/forgejo/pulls/6459#issuecomment-2562521. Thanks, @viceice! I found a good reason to use `display: flex;` for the switch items: it prevents whitespaces between HTML tags from showing up between the icon and the text. I was wondering why the new switch is wider, now I noticed why while playing with it. Lack of this additional whitespace looks better and is consistent with most of the UI. ## Preview |Description|Image| |-|-| |The margin that's supposed to be (no whitespace)|| |Redesigned switch before|| |After|| Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6544 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Reviewed-by: Otto <otto@codeberg.org> Co-authored-by: 0ko <0ko@noreply.codeberg.org> Co-committed-by: 0ko <0ko@noreply.codeberg.org>
This commit is contained in:
parent
9a608a034d
commit
03fe21d020
1 changed files with 3 additions and 5 deletions
|
@ -10,8 +10,10 @@
|
|||
}
|
||||
|
||||
.switch .item {
|
||||
color: var(--color-text);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: .5em 1.125em;
|
||||
color: var(--color-text);
|
||||
border-radius: var(--border-radius);
|
||||
text-wrap: nowrap;
|
||||
}
|
||||
|
@ -20,7 +22,3 @@
|
|||
background: var(--color-active);
|
||||
outline: 1px solid var(--color-input-border);
|
||||
}
|
||||
|
||||
.switch .item svg {
|
||||
vertical-align: sub;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue