[3.0] Theme split (wave 8, part 3) — align text with start and end instead of left and right - #9570
Open
albertlast wants to merge 1 commit into
Open
Conversation
This was referenced Aug 29, 2026
Closed
albertlast
force-pushed
the
3.0/theme-rtl-textalign
branch
from
September 2, 2026 05:02
c807c4d to
8589793
Compare
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 <mathiaspapealbert@hotmail.com>
albertlast
force-pushed
the
3.0/theme-rtl-textalign
branch
from
September 2, 2026 07:12
8589793 to
d9a44fa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Part 3 of wave 8 of the #7933 split.
text-align: startandtext-align: endfollow the writing direction, so the elevenplaces where
rtl.cssdid nothing except mirror the alignment no longer need an overrideat all.
Same rule as part 2: only exact mirrors are converted — the base stylesheet says
leftandrtl.csssaysright, or the reverse.Left alone on purpose:
rtl.csssets where the base sheet has none, which a single logicaldeclaration cannot express
code.bbc_codeandpre.file_contentstaytext-align: leftin a right-to-left language because code should not be mirrored. That rule is untouched,
and converting it would have been a real bug rather than a no-op.
Two that needed care rather than a substitution
#main_grid td.daysshares a rule with#month_grid td.days, and only the first has amirror. It turned out to be safe anyway: the mini calendar re-declares
text-align: centerimmediately below at equal specificity, so the shared value neverreaches it.
rtl.cssaligned#stats tr.windowbg th.lefttextand#stats tr.titlebg th.lefttextin one rule, and only the
windowbghalf has a rule to mirror — thetitlebghalf isaligned by the generic
.lefttextinstead. Removing the pair wholesale would have quietlydropped the flip for
titlebg, so that half keeps its override, now standing alone with acomment explaining why.
How this was checked
Same criterion and method as part 2 — nothing moves in either direction — with
text-alignanddirectionrecorded alongside the geometry, on 28 pages, captured backto back across a stash.
text-alignkeywordtext-alignkeywordNo geometry moved in either direction.
The count is larger than the eleven converted rules because
text-aligninherits, soevery child reports the new keyword too. In right-to-left the changes read
right -> startandleft -> end, which are the same rendering; in left-to-right theyread
left -> startandright -> end.rtl.cssgoes from 480 lines to 453.Issues References (Fixes|Related|Closes)
Related to #7933.
On the ordering of these four
These were originally stacked. They are not any more — each of #9569, #9570, #9571 and
#9572 now branches from
release-3.0on its own and contains exactly one commit, so eachdiff shows only its own property and nothing else. They can be reviewed in any order.
They cannot all be merged without a rebase in between, and that is worth being straight
about. One
rtl.cssrule usually mirrors several properties at once, so these PRs editsome of the same declaration blocks.
release-3.0has:#9569 removes both
floats, #9570 removes thetext-align, #9571 removes theclear—and a rule only disappears once its last declaration is gone. Merging any one of these is
fine; after that I will rebase the rest, which is a few minutes of work each time. Of the
six pairs,
text-align+clearandclear+margins merge cleanly as they stand; thefloatone overlaps with all three, so merging that one first costs the least.