Skip to content

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

Open
albertlast wants to merge 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/theme-logical-inline-styles
Open

[3.0] Theme split (wave 4, part 6) — use logical properties in the direction-branching inline styles#9391
albertlast wants to merge 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant