[3.0] Theme split (wave 8, part 2) — float with logical properties instead of left and right - #9569
Open
albertlast wants to merge 2 commits into
Open
[3.0] Theme split (wave 8, part 2) — float with logical properties instead of left and right#9569albertlast wants to merge 2 commits into
albertlast wants to merge 2 commits into
Conversation
rtl.css exists to flip physical properties for right-to-left languages, so every rule in it is an override of something another stylesheet draws. Sixteen of them override markup the theme stopped emitting, and have been dead for some time: - the event editor was rewritten and now draws no ul at all, which takes out the whole "edit event section" block plus the two #event_main rules - .bbc_standard_quote and .bbc_alternate_quote were checked and kept: those class names are built at runtime in BBCodeParser, so grepping for them finds nothing even though the markup does emit them - the rest name ids and classes that appear nowhere in Themes/ or Sources/: #postbuttons_upper, .reportlinks, #personal_messages span#author and span#topic_title, h3.search_hd, #popularposts, #popularactivity, .topic .mod_icons, .stats_icon, .search_results_posts .buttons and #helpmain h3.section Checked by loading 24 pages as an administrator with a right-to-left language active, including the event editor, the statistics centre, help, search results and the personal messages area: 7086 elements, and not one of the removed selectors matches any of them. .topic .mod_icons is the counterpart of the index.css rule removed in SimpleMachines#9547, which left this copy behind. Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
float: inline-start and float: inline-end follow the writing direction on their own, so a rule that uses them needs no right-to-left counterpart. This converts the 26 floats where rtl.css was doing nothing more than mirroring the value, and drops those overrides. The 26 are the ones where the override is an exact mirror: index.css and profile.css say left and rtl.css says right, or the other way round. Floats whose right-to-left value is not the mirror of the left-to-right one are left alone, because a single logical declaration cannot reproduce two different values; the same goes for the floats rtl.css adds where the base sheet has none. #post_header dt/dd shared a rule with #event_options dt/dd, and only the first pair has a mirror in rtl.css. Converting the pair together would have started mirroring the event editor, which is not mirrored today, so the rule is split and #event_options keeps a physical float with a comment saying why. Checked by recording float, clear, text-align, the inline margins and padding, and the bounding rectangle of every element on 26 pages, before and after, captured back to back so nothing else about the forum could move in between: - left-to-right: 8018 elements, the only differences are the 82 float keywords themselves. No geometry changes at all. - right-to-left: 8017 elements, 81 float keywords, and again nothing else. The keyword is expected to differ: getComputedStyle reports inline-start rather than resolving it to left or right. What matters is that every x, y, width, height, margin and padding is identical in both directions. rtl.css goes from 555 lines to 480. Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
This was referenced Aug 29, 2026
Open
Closed
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 2 of wave 8 of the #7933 split. Stacked on #9568 — review that one first; this
branch contains it.
float: inline-startandfloat: inline-endfollow the writing direction by themselves,so a rule written that way needs no right-to-left counterpart at all. This converts the
floats where
rtl.csswas doing nothing except mirroring the value, and deletes thoseoverrides.
This is the same move #9356 and #9357 made for the float/align utilities and for
dl.settings, applied to the rest of the theme.What is and is not converted
Only the 26 floats whose override is an exact mirror —
index.css,profile.cssorcalendar.csssaysleftandrtl.csssaysright, or the reverse. Those are the oneswhere one logical declaration reproduces both directions exactly.
Deliberately left alone:
single logical declaration cannot express two different values, so converting them
would change how one direction renders.
rtl.cssadds where the base stylesheet has none. Same reason.#post_header dt/ddshared a rule with#event_options dt/dd, and only the firstpair has a mirror in
rtl.css. Converting them together would have started mirroring theevent editor, which is not mirrored today, so the rule is split and
#event_optionskeeps a physical float with a comment recording why. That the event editor is unmirrored
in right-to-left looks like a real gap, but it is a behaviour change and does not belong
in a no-op PR.
How this was checked
The criterion for this part is that nothing moves, in either direction.
For every element on 26 pages I recorded
float,clear,text-align, the inlinemargins and padding, and the full bounding rectangle — before and after, captured back to
back across a stash so no other forum state could shift in between.
floatkeywordfloatkeywordNo geometry changed anywhere — not one x, y, width, height, margin or padding.
The keyword itself is expected to differ:
getComputedStylereportsinline-startrather than resolving it back to
leftorright. The geometry is the part that provesthe rendering is untouched.
Worth recording for anyone repeating this: a first attempt showed six extra differences
on the board index, all on the "Users online" line. That was the online-member count
changing between captures, not the CSS — the element's right edge and its
<strong>child were identical and only the text width moved. Capturing the pair back to back makes
it go away.
rtl.cssgoes from 555 lines to 480.Issues References (Fixes|Related|Closes)
Related to #7933.