0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-23 06:15:56 -05:00
forgejo/web_src/css/modules
0ko 03fe21d020 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)|![](https://codeberg.org/attachments/c0377eaa-7dec-4ef1-a4d6-70ad67608a8c)|
|Redesigned switch before|![](https://codeberg.org/attachments/d05bb17a-7e5f-4356-9840-2682f5b31f8a)|
|After|![](https://codeberg.org/attachments/b62c9373-395c-47a3-a8aa-b6905a22b11a)|

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>
2025-01-13 17:10:43 +00:00
..
animations.css Change --border-radius-circle to --border-radius-full (gitea#30936) 2024-05-27 13:15:20 +02:00
breadcrumb.css
button.css
card.css
checkbox.css Tweak and fix toggle checkboxes (#30527) 2024-04-21 12:06:42 +02:00
comment.css
container.css Fix wiki search overflowing on wide screens (#6047) 2024-11-25 09:50:13 +01:00
divider.css Pulse page improvements (#30149) 2024-04-21 11:08:33 +02:00
flexcontainer.css Use flex-container for dashboard layout (#30214) 2024-04-21 11:12:00 +02:00
grid.css Implement CSS-only input toggling, refactor related forms 2024-08-21 15:03:19 +02:00
header.css Pulse page improvements (#30149) 2024-04-21 11:08:33 +02:00
input.css Fix right-aligned input icons (#30301) 2024-04-07 15:40:31 +02:00
label.css ui: fix issue labels 2024-07-17 16:19:44 +05:00
list.css Fix floated list items (#30377) 2024-04-15 20:01:35 +02:00
message.css
modal.css
navbar.css
normalize.css
segment.css Fix border-radius of header+segment boxes (#30667) 2024-04-28 15:39:01 +02:00
select.css
svg.css
switch.css Use flex for switch items (#6544) 2025-01-13 17:10:43 +00:00
table.css
tippy.css
toast.css