From d9a44fae6f649359a52423b7e4897fe4a224e38a Mon Sep 17 00:00:00 2001 From: albertlast Date: Wed, 2 Sep 2026 09:03:14 +0200 Subject: [PATCH] Aligns text with start and end instead of left and right text-align: start and text-align: end follow the writing direction, so the eleven places where rtl.css did nothing but mirror the alignment no longer need an override. As with the floats, only exact mirrors are converted: the base sheet says left and rtl.css says right, or the reverse. Alignments that rtl.css sets where the base sheet has none are left alone, and so are the deliberate ones - code blocks and file contents stay left-aligned in a right-to-left language on purpose, and that rule is untouched. Two rules needed care rather than a substitution: - #main_grid td.days shares its rule with #month_grid td.days, but the mini calendar re-declares text-align: center immediately below, so the shared value never reaches it and the group is safe to convert. - rtl.css aligned #stats tr.windowbg th.lefttext and #stats tr.titlebg th.lefttext together, and only the windowbg half has a rule to mirror. The titlebg half is aligned by .lefttext instead, so it keeps its override, now with a comment saying why it is on its own. Signed-off-by: albertlast --- Themes/default/css/admin.css | 2 +- Themes/default/css/calendar.css | 4 ++-- Themes/default/css/index.css | 16 ++++++++-------- Themes/default/css/rtl.css | 32 +++----------------------------- 4 files changed, 14 insertions(+), 40 deletions(-) diff --git a/Themes/default/css/admin.css b/Themes/default/css/admin.css index 0b21abce68..beed01452f 100644 --- a/Themes/default/css/admin.css +++ b/Themes/default/css/admin.css @@ -421,7 +421,7 @@ fieldset.qa_fieldset { span.search_weight { width: 40px; padding: 0 0.5em; - text-align: right; + text-align: end; } .search_settings { width: 47%; diff --git a/Themes/default/css/calendar.css b/Themes/default/css/calendar.css index 45053d1a74..d4868b2652 100644 --- a/Themes/default/css/calendar.css +++ b/Themes/default/css/calendar.css @@ -85,7 +85,7 @@ td.days:hover { #main_grid th.days { width: 14%; padding: 5px 10px; - text-align: left; + text-align: start; background: var(--calendar-th-bg); } #main_grid td.weeks { @@ -135,7 +135,7 @@ td.days:hover { #main_grid td.days, #month_grid td.days { vertical-align: top; - text-align: left; + text-align: start; border-right: 1px solid var(--window-border-color); border-bottom: 1px solid var(--window-border-color); } diff --git a/Themes/default/css/index.css b/Themes/default/css/index.css index 2a60a91631..45555514a3 100644 --- a/Themes/default/css/index.css +++ b/Themes/default/css/index.css @@ -1795,7 +1795,7 @@ ul li.greeting { .move_topic { width: 710px; margin: auto; - text-align: left; + text-align: start; } div.move_topic fieldset { margin-top: 1ex; @@ -1870,7 +1870,7 @@ fieldset.merge_options { .login dd { width: 54%; float: right; - text-align: left; + text-align: start; } .login p { text-align: center; @@ -2654,12 +2654,12 @@ dl.stats { text-align: center; } #stats tr.windowbg th.lefttext { - text-align: left; + text-align: start; } #stats tr.windowbg th.stats_month { width: 25%; padding: 0 2em; - text-align: left; + text-align: start; } #stats tr.windowbg td.stats_day { padding: 0 3.5em; @@ -2797,7 +2797,7 @@ dl.addrules dt.floatleft { /* Styles for the search section. ------------------------------------------------- */ #searchform fieldset { - text-align: left; + text-align: start; padding: 0; border: none; } @@ -2825,7 +2825,7 @@ dl.addrules dt.floatleft { } #advanced_search dt { padding: 2px; - text-align: right; + text-align: end; width: 20%; } #advanced_search dd { @@ -2833,7 +2833,7 @@ dl.addrules dt.floatleft { float: left; padding: 2px; margin: 0 0 0 6px; - text-align: left; + text-align: start; } #search_results { margin-bottom: 5px; @@ -3357,7 +3357,7 @@ span.postby { max-width: 45em; float: left; margin: 0 0 4px 0; - text-align: right; + text-align: end; } /* Poll notices */ diff --git a/Themes/default/css/rtl.css b/Themes/default/css/rtl.css index 3cd748f49b..47e38f07e3 100644 --- a/Themes/default/css/rtl.css +++ b/Themes/default/css/rtl.css @@ -125,7 +125,6 @@ img#smflogo { text-align: left; } - .mark_read { float: left; } @@ -141,7 +140,6 @@ img#smflogo { } #poll_options dl.options dd { float: right; - text-align: left; } /* poster and postarea + moderation area underneath */ @@ -272,11 +270,6 @@ ul.quickbuttons li { margin: 0; } -/* Styles for the move topic section. */ -.move_topic { - text-align: right; -} - /* Styles for the login areas. ------------------------------------------------------- */ .login dt { @@ -284,7 +277,6 @@ ul.quickbuttons li { } .login dd { float: right; - text-align: right; } .login h3 img { margin: 0 0 0.5em; @@ -434,9 +426,6 @@ dl.stats dt { dl.stats dd { margin: 0 2% 4px 0; } -#stats tr.windowbg th.stats_month { - text-align: right; -} .generic_bar .bar, .progress_bar .bar { left: unset; right: 0; @@ -444,23 +433,18 @@ dl.stats dd { tr.windowbg th.stats_month, tr.windowbg td.stats_day { text-align: right; } -#stats tr.windowbg th.lefttext, #stats tr.titlebg th.lefttext { +/* Only the windowbg half of this pair has a left-to-right rule to mirror; + the titlebg half is aligned by .lefttext, so it still needs flipping here. */ +#stats tr.titlebg th.lefttext { text-align: right; } -/* Styles for the advanced search section. -------------------------------------------------- */ -#searchform fieldset { - text-align: right; -} #advanced_search dt { float: right; - text-align: left; } #advanced_search dd { float: right; margin: 0 0.5em 0 0; - text-align: right; } /* Boards picker */ #searchform fieldset p { @@ -510,10 +494,6 @@ tr.windowbg th.stats_month, tr.windowbg td.stats_day { padding: 0 0 0 13px; } -span.search_weight { - text-align: left; -} - /* Manage Bans */ .ban_restriction { margin: 0.2em 2.2em 0.2em 0; @@ -543,12 +523,6 @@ h3 .collapse { margin-right: 7px; } -/* Styles for the calendar. ------------------------------ */ -#main_grid th.days, #main_grid td.days { - text-align: right; -} - /* Code is a code do it LTR */ code.bbc_code, pre.file_content { text-align: left;