diff options
author | 0ko <0ko@noreply.codeberg.org> | 2025-01-13 09:28:30 +0100 |
---|---|---|
committer | Otto <otto@codeberg.org> | 2025-01-13 09:28:30 +0100 |
commit | 0858a879e57ef01d1070152c84bed9961fe2444d (patch) | |
tree | 09e709641c0de0a611ad3a35fe1e3989b28aab57 | |
parent | Apply switch redesign to more areas (#6542) (diff) | |
download | forgejo-0858a879e57ef01d1070152c84bed9961fe2444d.tar.xz forgejo-0858a879e57ef01d1070152c84bed9961fe2444d.zip |
Prevent vertical stretching of the switch (#6543)
Followup to https://codeberg.org/forgejo/forgejo/pulls/6459 and https://codeberg.org/forgejo/forgejo/pulls/6542.
There are some edge cases where the UI would try to stretch the switch. Such inputs aren't really supposed to be dynamically stretched like this because it never looks good. So, I added a few rules to prevent this.
## Preview
This is the edge case with an artificially narrow screen.
|Before|After|
|-|-|
|![](/attachments/343d395c-54dd-4d86-a402-0c6b6a06237a)|![](/attachments/26b072a3-4056-4b1a-a08f-e903160609d9)|
No visual changes are expected outside of such edge case.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6543
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
-rw-r--r-- | web_src/css/modules/switch.css | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/web_src/css/modules/switch.css b/web_src/css/modules/switch.css index 7afb275065..510b6a4bac 100644 --- a/web_src/css/modules/switch.css +++ b/web_src/css/modules/switch.css @@ -1,7 +1,9 @@ .switch { display: grid; grid-auto-flow: column; + height: fit-content; align-items: center; + align-self: center; background: var(--color-menu); border: 1px solid var(--color-input-border); border-radius: var(--border-radius); |