Skip to content

[3.0] Theme split (wave 9, part 1) — lay settings lists out on a grid rather than with floats - #9662

Merged
jdarwood007 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/theme-settings-grid
Sep 8, 2026
Merged

[3.0] Theme split (wave 9, part 1) — lay settings lists out on a grid rather than with floats#9662
jdarwood007 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/theme-settings-grid

Conversation

@albertlast

@albertlast albertlast commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Description

Part 1 of wave 9 of the #7933 split.

dl.settings is the label-and-control list that the administration centre and the profile
are built from — 97 of them across the settings pages. Each row was a floated dt at
56% beside a floated dd at 42%.

Floats leave the two halves of a row free to find their own heights, so a label and its
control are not lined up with each other. Two columns of a grid are. This moves the list
onto one, which also means the dt no longer needs a width, a float or a clear, and the
dl no longer needs overflow: auto to contain them.

This is a deliberate visual change, agreed beforehand. It is CSS only — no template
touches the class, and rtl.css needs no counterpart because grid columns follow the
writing direction on their own.

Two details worth pointing at

align-items: start. A grid item stretches to the height of its row by default, so a
short label beside a tall control grew to match it — in one case from 20px to 427px.
That is invisible while a label has no background of its own, but it is not what the
floated version did, so the labels are pinned to the top of their row. Without this line
186 labels changed height; with it, 39 do.

dt.windowbg spans the whole row rather than the label column, which is what its
former width: 98% meant. The snapshot this series ports from puts it in grid-column: 1 / 2 — a single column — which would have quietly halved it. Nothing emits the class
today either way.

Narrow screens needed fixing too

Both stylesheets that stack a settings list did it with width: 100%; float: none.
Neither does anything to a grid item, so the two columns survived all the way down and
each half kept only half the width it used to have. Two rules restore it:

  • responsive.css below 480px, for the forum
  • maintenance.css below 700px, for the installer and upgrader — where a grid-column
    rule was already sitting, waiting for a grid that did not exist yet

This is worth calling out because the first round of checking was done at desktop width
only and passed cleanly. It took measuring at six widths to find it.

How this was checked

Across 25 pages holding those 97 lists and 264 rows, comparing the display, float and
full bounding rectangle of every element:

lists that change display 97 — every one
dt/dd that lose their float 522
changes outside a settings list only y on 267 elements and h on 149
page height delta mean +1.6px, range −40 to +130
children overflowing their list 6 before, 6 after — the same ones, all pre-existing
stacking at 1280/900/720/600/470/380px identical to before, on three settings pages
stacked rows at 470px and 380px pixel for pixel identical, no page scrolls sideways

Nothing outside the lists is restyled: no display, float, x or w changes anywhere
else. Things below a list simply move as it changes height.

In a right-to-left language, all 57 label/control pairs on three sample pages put the
label on the right, so the mirroring works with no override.

One trade-off to be aware of

The label column narrows from 56% to 50%, so 39 labels wrap one line further. That was
part of what was agreed, and it buys a wider control column. If the old proportions are
preferred, it is a one-line change — grid-template-columns: 56% 42% instead of
1fr 1fr — and I am happy to make it.

Issues References (Fixes|Related|Closes)

Part of the #7933 split. Wave 8 is fully merged; this opens wave 9.

🤖 Generated with Claude Code

@github-actions github-actions Bot added the Theme label Sep 8, 2026
@albertlast albertlast changed the title [3.0] Lay settings lists out on a grid rather than with floats [3.0] Theme split (wave 9, part 1) — lay settings lists out on a grid rather than with floats Sep 8, 2026
dl.settings is the label-and-control list the admin centre and the profile are
built from - 97 of them across the settings pages. Each row was a floated dt
at 56% and a floated dd at 42%, which leaves the two halves of a row free to
find their own heights and does not line them up with each other.

Two columns of a grid do line up, and the row is the grid's own, so the dt no
longer needs a width, a float or a clear, and the dl no longer needs
overflow: auto to contain them. Labels and controls now share a baseline and
the columns are even.

align-items: start keeps a label at the top of its row. Without it a grid item
stretches to the height of the row, so a short label beside a tall control
grew to match it - in one case from 20px to 427px. That is invisible while a
label has no background of its own, but it is not what the floated version
did.

dt.windowbg spans the whole row rather than the label column, which is what
its 98% width meant before. Nothing emits that class today.

Narrow screens stacked these lists by setting the dt and dd to width: 100%
and float: none. Neither does anything to a grid item, so the two columns
survived down to the smallest screen and each half was left at half the width
it used to have. Both stylesheets that stack a settings list now collapse the
grid to a single column as well: responsive.css below 480px for the forum,
and maintenance.css below 700px for the installer and upgrader, where a
grid-column rule was already waiting for a grid that did not exist yet.

Checked across 25 pages holding 97 settings lists and 264 rows, comparing the
display, float and bounding rectangle of every element before and after:

- the 97 lists change display, and 522 dt and dd elements lose their float
- outside those lists only y and h change, on 267 and 149 elements: things
  below a list move as it changes height, and nothing is restyled
- the six children that already stuck out of their list still do, and no new
  ones appear
- at 1280, 900, 720, 600, 470 and 380 pixels wide, on three settings pages,
  the lists stack at exactly the same widths as before and the stacked rows
  come out pixel for pixel identical, with no page scrolling sideways
- in a right-to-left language all 57 label and control pairs on three sample
  pages put the label on the right, so the grid mirrors without an override

39 labels are one line taller because the label column narrows from 56% to
50%. Keeping the old proportions instead is a one-line change to the
grid-template-columns value.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
@albertlast
albertlast force-pushed the 3.0/theme-settings-grid branch from afd1091 to c9ca8ff Compare September 8, 2026 04:52
@jdarwood007
jdarwood007 merged commit 98feb91 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.

3 participants