chore: enforce RTL-friendly logical CSS properties with a linter (#12491)
Related issue: https://codeberg.org/forgejo/forgejo/issues/8581 This should be a nice first step towards RTL support. Future PRs can look at updating the tailwind classes, changing some of the icons (arrow left might need to become arrow right in some cases for example, and updating the template files) Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12491 Reviewed-by: 0ko <0ko@noreply.codeberg.org>
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
|
||||
&.active {
|
||||
z-index: 2;
|
||||
padding-left: var(--switch-padding-inline);
|
||||
padding-inline-start: var(--switch-padding-inline);
|
||||
background: var(--color-active);
|
||||
outline: 1px solid var(--color-input-border);
|
||||
}
|
||||
@@ -55,12 +55,12 @@
|
||||
/* Corner rounding aid: item that has to crawl under it's active neighbor,
|
||||
so when it is hovered, there are no ugly unpainted v/^ shapes between them */
|
||||
.switch > .item:has(+ .active.item) { /* Active neighbor is next item */
|
||||
margin-right: calc(-1 * var(--border-radius));
|
||||
padding-right: calc(var(--switch-padding-inline) + var(--border-radius));
|
||||
margin-inline-end: calc(-1 * var(--border-radius));
|
||||
padding-inline-end: calc(var(--switch-padding-inline) + var(--border-radius));
|
||||
}
|
||||
.switch > .active.item + .item { /* Active neighbor is previous item */
|
||||
margin-left: calc(-1 * var(--border-radius));
|
||||
padding-left: calc(var(--switch-padding-inline) + var(--border-radius));
|
||||
margin-inline-start: calc(-1 * var(--border-radius));
|
||||
padding-inline-start: calc(var(--switch-padding-inline) + var(--border-radius));
|
||||
}
|
||||
|
||||
/* Make counters embedded into items more visible on brighter backgrounds */
|
||||
|
||||
Reference in New Issue
Block a user