From 06b8d8e5f7b9ab176af046064d8ebe8f7ad66981 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 a4eaee0464..36c3aad52b 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 3cc722d75b..844e9e8286 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: inline-start; 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: inline-start; 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 d7af7e7eb8..3786240878 100644 --- a/Themes/default/css/rtl.css +++ b/Themes/default/css/rtl.css @@ -132,9 +132,6 @@ img#smflogo { #poll_options dl.options dt { clear: right; } -#poll_options dl.options dd { - text-align: left; -} .postarea, .moderatorbar { margin: 0 175px 0 0; } @@ -245,13 +242,8 @@ ul.quickbuttons li { margin: 0; } -/* Styles for the move topic section. */ -.move_topic { - text-align: right; -} .login dd { float: right; - text-align: right; } .login h3 img { margin: 0 0 0.5em; @@ -364,9 +356,6 @@ h3.profile_hd { 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; @@ -374,22 +363,17 @@ 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 { margin: 0 0.5em 0 0; - text-align: right; } /* Boards picker */ #searchform fieldset p { @@ -439,10 +423,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; @@ -468,12 +448,6 @@ ul.moderation_notes li { 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;