Skip to content

[3.0] Theme split (wave 8, part 2) — float with logical properties instead of left and right - #9569

Merged
jdarwood007 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/theme-rtl-float
Sep 2, 2026
Merged

[3.0] Theme split (wave 8, part 2) — float with logical properties instead of left and right#9569
jdarwood007 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/theme-rtl-float

Conversation

@albertlast

@albertlast albertlast commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Description

Part 2 of wave 8 of the #7933 split.

float: inline-start and float: inline-end follow 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.css was doing nothing except mirroring the value, and deletes those
overrides.

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 mirrorindex.css, profile.css or
calendar.css says left and rtl.css says right, or the reverse. Those are the ones
where one logical declaration reproduces both directions exactly.

Deliberately left alone:

  • floats whose right-to-left value is not the mirror of the left-to-right one. A
    single logical declaration cannot express two different values, so converting them
    would change how one direction renders.
  • floats that rtl.css adds where the base stylesheet has none. Same reason.

#post_header dt/dd shared a rule with #event_options dt/dd, and only the first
pair has a mirror in rtl.css. Converting them 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 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 inline
margins 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.

elements differences
left-to-right 8018 82, all of them the float keyword
right-to-left 8017 81, all of them the float keyword

No geometry changed anywhere — not one x, y, width, height, margin or padding.

The keyword itself is expected to differ: getComputedStyle reports inline-start
rather than resolving it back to left or right. The geometry is the part that proves
the 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.css goes from 555 lines to 480.

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.0 on its own and contains exactly one commit, so each
diff 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.css rule usually mirrors several properties at once, so these PRs edit
some of the same declaration blocks. release-3.0 has:

#poll_options dl.options dt { float: right; clear: right; }
#poll_options dl.options dd { float: right; text-align: left; }

#9569 removes both floats, #9570 removes the text-align, #9571 removes the clear
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+clear and clear+margins merge cleanly as they stand; the
float one overlaps with all three, so merging that one first costs the least.

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>
@jdarwood007
jdarwood007 merged commit 8d94f6d into SimpleMachines:release-3.0 Sep 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants