Skip to content

[3.0] Theme split (wave 9, part 2) — clear the post sections with inline-end - #9663

Merged
jdarwood007 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/theme-rtl-signature-clear
Sep 8, 2026
Merged

jdarwood007 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/theme-rtl-signature-clear

Conversation

@albertlast

Copy link
Copy Markdown
Collaborator

Description

Part 2 of wave 9 of the #7933 split.

index.css clears .signature, .attachments, .under_message and the two custom field
blocks in one rule, and rtl.css mirrored three of the five. clear: inline-end
follows the writing direction, so the override is no longer needed and all five behave the
same as each other.

Why wave 8 skipped this, and why it is safe now

Wave 8 (#9571) converted every clear whose override was an exact mirror, and deliberately
left this group alone: the two that rtl.css does not mirror would change the side they
clear in a right-to-left language, which is a behaviour change rather than a no-op.

That turns out not to matter, because the clear does nothing to any of the five.

The same rule also gives them width: 100% and overflow: auto. overflow: auto makes
the box a block formatting context root, and such a box does not overlap a preceding float
— at full width it cannot sit beside one either, so it is already pushed below it. That is
exactly what the clear was asking for. The declaration has been redundant all along,
which is why nobody noticed the two missing mirrors.

Measured, not assumed

Toggling clear through none, left, right and both on all five elements — in both
writing directions, at 1280px, 700px and 470px wide:

none of them moves by a single pixel.

Only .under_message renders on the test forum's posts (no signature, attachments or
custom fields on them), so the other four were injected into the live document in their
real position in order to be measured.

Then the usual sweep of 18 pages, recording clear, float, display and the bounding
rectangle of every element, before and after, captured back to back:

elements differences
left-to-right 4732 1 — the clear keyword itself
right-to-left 4732 1 — the same keyword

No geometry changed in either direction. The right-to-left result is the one that matters,
since that is where two of the five swap the side they clear.

rtl.css goes from 366 lines to 361. With this, every clear in the theme that can be
expressed logically is.

Issues References (Fixes|Related|Closes)

Part of the #7933 split; finishes the clear work started in #9571.

🤖 Generated with Claude Code

index.css clears .signature, .attachments, .under_message and the two custom
field blocks in one rule, and rtl.css mirrored three of the five. clear:
inline-end follows the writing direction, so the override is no longer needed
and all five behave the same way as each other.

The two that rtl.css did not mirror change side in a right-to-left language,
which is why wave 8 left this group alone. It turns out not to matter,
because the clear does nothing to any of the five: the same rule gives them
width: 100% and overflow: auto, and a box with its own block formatting
context does not overlap a preceding float. At full width it cannot sit
beside one either, so it is already pushed below - which is what the clear
was asking for.

Measured rather than assumed. Toggling clear through none, left, right and
both on all five, in both writing directions and at 1280px, 700px and 470px
wide, moves none of them by a single pixel. Only .under_message renders on
the test forum's posts, so the other four were injected into the live
document to be measured.

Then the usual sweep of 18 pages, recording clear, float, display and the
bounding rectangle of every element, before and after, back to back:

- left-to-right: 4732 elements, one difference, the clear keyword itself
- right-to-left: 4732 elements, one difference, the same keyword

No geometry changed in either direction. The right-to-left case is the one
that matters, since that is where two of the five swap the side they clear.

rtl.css goes from 366 lines to 361.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
@github-actions github-actions Bot added the Theme label Sep 8, 2026
@jdarwood007
jdarwood007 merged commit 1ff05f8 into SimpleMachines:release-3.0 Sep 8, 2026
9 checks passed
@albertlast albertlast mentioned this pull request Sep 9, 2026
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