forgejo-aneksajo/web_src/css/modules/switch.css
forgejo-backport-action 9147665e2c [v11.0/forgejo] fix(ui): use gap in switch items (#7589)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/7581

Followup to _many PRs_ where the old switches were converted to this one.

The main change here is to the switch with counter. It was missing a gap.

Additionally, it removes tailwind helpers the other switches retained from before switch refactors, because they are now using gap.

Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7589
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2025-04-21 09:42:23 +00:00

35 lines
670 B
CSS

.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);
}
.switch .item {
display: flex;
gap: 0.5rem;
align-items: center;
padding: .5em 1.125em;
color: var(--color-text);
border-radius: var(--border-radius);
text-wrap: nowrap;
}
.switch .active.item {
background: var(--color-active);
outline: 1px solid var(--color-input-border);
}
@media (pointer: coarse) {
.switch .item {
padding: .75em 1.125em;
}
}
.switch button.item {
background: transparent;
}