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:
Cameron Radmore 2026-05-11 00:20:45 +02:00 committed by Gusted
parent a8cae6d511
commit 6b75654cc2
74 changed files with 556 additions and 599 deletions

View file

@ -35,10 +35,10 @@
vertical-align: inherit;
font-weight: var(--font-weight-normal);
border-bottom: 1px solid var(--color-secondary);
border-left: none;
border-inline-start: none;
}
.ui.table > thead > tr > th:first-child {
border-left: none;
border-inline-start: none;
}
.ui.table > thead > tr:first-child > th:first-child {
border-radius: 0.28571429rem 0 0;
@ -62,7 +62,7 @@
}
.ui.table > tfoot > tr > th:first-child,
.ui.table > tfoot > tr > td:first-child {
border-left: none;
border-inline-start: none;
}
.ui.table > tfoot > tr:first-child > th:first-child,
.ui.table > tfoot > tr:first-child > td:first-child {
@ -154,7 +154,7 @@
.ui.table[class*="left aligned"],
.ui.table [class*="left aligned"] {
text-align: left;
text-align: start;
}
.ui.table[class*="center aligned"],
@ -164,7 +164,7 @@
.ui.table[class*="right aligned"],
.ui.table [class*="right aligned"] {
text-align: right;
text-align: end;
}
.ui.table[class*="top aligned"],
@ -301,7 +301,7 @@
.ui.basic.table > tfoot > tr > th,
.ui.basic.table > tr > th {
background: transparent;
border-left: none;
border-inline-start: none;
}
.ui.basic.table > tbody > tr {
border-bottom: 1px solid var(--color-secondary);
@ -325,7 +325,7 @@
.ui[class*="very basic"].table:not(.striped) > tr > td:first-child,
.ui[class*="very basic"].table:not(.striped) > tbody > tr > td:first-child,
.ui[class*="very basic"].table:not(.striped) > tfoot > tr > td:first-child {
padding-left: 0;
padding-inline-start: 0;
}
.ui[class*="very basic"].table:not(.striped) > tr > th:last-child,
.ui[class*="very basic"].table:not(.striped) > thead > tr > th:last-child,
@ -334,7 +334,7 @@
.ui[class*="very basic"].table:not(.striped) > tr > td:last-child,
.ui[class*="very basic"].table:not(.striped) > tbody > tr > td:last-child,
.ui[class*="very basic"].table:not(.striped) > tfoot > tr > td:last-child {
padding-right: 0;
padding-inline-end: 0;
}
.ui[class*="very basic"].table:not(.striped) > thead > tr:first-child > th {
padding-top: 0;
@ -347,7 +347,7 @@
.ui.celled.table > tr > td,
.ui.celled.table > tbody > tr > td,
.ui.celled.table > tfoot > tr > td {
border-left: 1px solid var(--color-secondary-alpha-50);
border-inline-start: 1px solid var(--color-secondary-alpha-50);
}
.ui.celled.table > tr > th:first-child,
.ui.celled.table > thead > tr > th:first-child,
@ -356,15 +356,14 @@
.ui.celled.table > tr > td:first-child,
.ui.celled.table > tbody > tr > td:first-child,
.ui.celled.table > tfoot > tr > td:first-child {
border-left: none;
border-inline-start: none;
}
.ui.compact.table > tr > th,
.ui.compact.table > thead > tr > th,
.ui.compact.table > tbody > tr > th,
.ui.compact.table > tfoot > tr > th {
padding-left: 0.7em;
padding-right: 0.7em;
padding-inline: 0.7em;
}
.ui.compact.table > tr > td,
.ui.compact.table > tbody > tr > td,
@ -376,10 +375,10 @@
.ui.table > thead > tr > th:first-of-type,
.ui.table > tbody > tr > td:first-of-type,
.ui.table > tr > td:first-of-type {
padding-left: 10px;
padding-inline-start: 10px;
}
.ui.table > thead > tr > th:last-of-type,
.ui.table > tbody > tr > td:last-of-type,
.ui.table > tr > td:last-of-type {
padding-right: 10px;
padding-inline-end: 10px;
}