Skip to content

[3.0] Theme split (wave 4, part 6) — use logical properties in the direction-branching inline styles - #9391

Merged
live627 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/theme-logical-inline-styles
Aug 9, 2026
Merged

[3.0] Theme split (wave 4, part 6) — use logical properties in the direction-branching inline styles#9391
live627 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/theme-logical-inline-styles

Conversation

@albertlast

Copy link
Copy Markdown
Collaborator

Description

Part of the split of #7933, wave 4 part 6.

Seven inline styles pick their side by hand:

style="margin-', Utils::$context['right_to_left'] ? 'right' : 'left', ': ', …

which is what margin-inline-start and padding-inline-start already mean. The
values are unchanged; only the branch goes. Six templates: ManageBoards,
ManageMaintenance, ManageMembergroups, Profile, Search.

One of the seven never worked

The board list on the membergroup editor writes the declaration with a space where
the colon should be:

<li class="board" style="margin-', … ? 'right' : 'left', ' ', $board['child_level'], 'em;">

so the browser drops it and boards nested under a parent are not indented at all.
On release-3.0, with a child and a grandchild board:

board style attribute computed
General Discussion margin-left 0em; 0px
Child board A margin-left 1em; 0px
Grandchild B margin-left 2em; 0px

After:

board style attribute computed
General Discussion margin-inline-start: 0em; 0px
Child board A margin-inline-start: 1em; 13.33px
Grandchild B margin-inline-start: 2em; 26.67px

Testing

On a clean install with a child board and a grandchild board added.

Board manager, ?action=admin;area=manageboards — the indentation is byte for
byte what the ternary produced, and now flips without it:

LTR RTL
General Discussion padding-left: 5px padding-right: 5px
Child board A padding-left: 35px padding-right: 35px
Grandchild B padding-left: 65px padding-right: 65px

Membergroup editor as above. composer lint is clean on all five files.

I have deliberately not taken the theme branch's other change to the same line,
which moves the board manager's base indent from 5px to 10px. That is a visual
tweak and does not belong in a change that is otherwise value-for-value.

Issues References (Fixes|Related|Closes)

Related to #7933

Seven inline styles pick their side by hand:

    style="margin-', Utils::$context['right_to_left'] ? 'right' : 'left', ': …"

which is what margin-inline-start and padding-inline-start already mean. The
values are unchanged; only the branch goes.

One of the seven never worked. The board list on the membergroup editor writes

    style="margin-left 1em;"

with a space where the colon should be, so the declaration is dropped and the
nested boards under a parent are not indented at all. Converting it fixes that as
a side effect.

Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
@albertlast albertlast mentioned this pull request Aug 8, 2026
@jdarwood007 jdarwood007 added this to the 3.0 Alpha 5 milestone Aug 8, 2026
@live627
live627 merged commit 6a47685 into SimpleMachines:release-3.0 Aug 9, 2026
4 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.

3 participants