0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-22 13:57:46 -05:00
forgejo/web_src/css
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
..
chroma
codemirror
editor Remove tab key handling in markdown editor, add toolbar buttons instead, re #4072 #4142 (#4263) 2024-06-30 13:03:32 +00:00
features ui: improve commit graph layout 2024-09-17 17:33:00 +02:00
markup Fix margin above headline in rendered org-mode (#4076) 2024-06-11 03:34:21 +00:00
modules Use flex for switch items (#6544) 2025-01-13 17:10:43 +00:00
repo Fix minor misalignment (#6541) 2025-01-13 08:27:42 +00:00
shared Forbid deprecated break-word in CSS (#30934) 2024-05-12 20:03:10 +02:00
standalone
themes ui: simplify main-attribute labels 2024-12-08 17:30:52 +05:00
actions.css Add support for workflow_dispatch (#3334) 2024-06-28 05:17:11 +00:00
admin.css
base.css New repo: Clean up and improve CSS 2024-12-28 22:31:12 +01:00
dashboard.css fix(ui): prevent uppercase in header of dashboard context selector 2024-08-04 16:10:15 +05:00
explore.css
font_i18n.css
form.css Rework user profile settings 2024-12-30 16:42:58 +01:00
helpers.css Merge pull request 'Replace gt-word-break with tw-break-anywhere' (#4102) from 0ko/forgejo:ui-replace-gt-word-break into forgejo 2024-06-11 10:39:03 +00:00
home.css
index.css ui: switch redesign (#6459) 2025-01-05 18:46:47 +00:00
install.css UI improvements to optional sections in installation page (#4062) 2024-06-07 17:57:54 +00:00
org.css Remove unneccessary uses of word-break: break-all (#31637) 2024-07-22 15:50:57 +02:00
repo.css Merge pull request 'Cosmetic changes and fixes around repo homepage' (#6401) from 0ko/forgejo:ui-repo-meta-2 into forgejo 2024-12-29 14:46:34 +00:00
review.css fix(ui): put buttons in a single row on mobile 2024-11-25 18:43:09 +05:00
user.css Rework user profile settings 2024-12-30 16:42:58 +01:00