Skip to content

[3.0] Theme split (wave 4, part 27) — point the quick buttons at design tokens - #9469

Merged
live627 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/theme-quickbutton-tokens
Aug 10, 2026
Merged

[3.0] Theme split (wave 4, part 27) — point the quick buttons at design tokens#9469
live627 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/theme-quickbutton-tokens

Conversation

@albertlast

Copy link
Copy Markdown
Collaborator

Description

Part of the #7933 split, following #9467 and #9468.

The quick button strip and the drop down that hangs off it were the next group of hard-coded values in index.css. .button itself has read --button-* since wave 2; these are the variants that sit on top of it — the strip's own colour, the four corner radii that make the buttons read as one bar, the moderation checkbox focus ring, and the post options drop down.

24 tokens in three groups, placed after /** Buttons **/, so this does not collide with #9467, #9468, #9443 or #9448. Every token holds the value the rule has today, so nothing renders differently.

The drop down sets a border and then overrides its left and top edges, so those keep their own tokens and all three stay shorthands.

One naming call worth flagging. The hover colour is --quickbutton-color_hover even though .button:hover is listed in the same selector:

.button:hover, .button:focus,
.quickbuttons > li:hover > a, .quickbuttons > li > a:focus {
	color: var(--quickbutton-color_hover);
	...
}
.button:hover, .button:focus {
	color: var(--button-color_hover);
}

The rule immediately below puts --button-color_hover back for .button, so #222 only ever reaches a quick button. Naming it after the button would be wrong about what it does.

Verification

0 differences, by both methods:

  • Raw source: index.css fetched over HTTP, rule bodies parsed out of the text and applied to a probe in cascade order — including :first-child, :last-child, :only-child, :hover and :focus, and the .button override chain above. 11 chains x 39 longhands = 429 values, 0 differences.
  • Real elements, in iframes at 1280px, on the three pages that actually draw these: ?action=recent, ?action=pm and the reply form's previous-posts list. 30 elements, 1200 values, 0 differences.

Rule text is taken from the file rather than from CSSRule.style.cssText, which cannot round-trip a border shorthand holding a var() that is then overridden on one edge — see #9468 for what that looks like when it goes wrong.

Noted while finding elements to measure, not addressed here: a topic display draws no .quickbuttons at all, logged in as an admin — they appear on the recent-posts list, the PM index and the reply form, but not under a post on ?topic=.

Issues References (Fixes|Related|Closes)

Related: #7933, #9467, #9468

The quick button strip on every post and topic row, and the drop down that
hangs off it, were the next group of hard-coded values left in index.css.
.button itself has read --button-* since wave 2; these are the variants
that sit on top of it.

Every token holds the value the rule has today, so nothing renders
differently. The drop down sets a border and then overrides its left and
top edges, so those keep their own tokens and all three stay shorthands.

The hover colour is named for the quick buttons rather than the buttons,
even though .button is listed in the same selector: the rule immediately
below it puts --button-color_hover back for .button, so the value only
ever reaches a quick button.

Signed-off-by: Mathias Albert <mathiaspapealbert@hotmail.com>
Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
@albertlast

Copy link
Copy Markdown
Collaborator Author

Correction to the last paragraph of the description: the claim that a topic display draws no .quickbuttons is wrong. I measured that on ?topic=1.0, which is a fatal on release-3.0Object of type SMF\TimeInterval (inheriting DateInterval) has not been correctly initialized by calling parent::__construct(), which is #9405 and still unmerged. There were no quick buttons because there was no post; the error page has none of the topic markup at all.

The verification in this PR is unaffected: the raw-source cascade chains were captured on ?board=1.0 and the 30 real elements in iframes on ?action=recent, ?action=pm and the reply form, all of which render.

@albertlast albertlast mentioned this pull request Aug 9, 2026
@live627
live627 merged commit 8e67282 into SimpleMachines:release-3.0 Aug 10, 2026
4 checks passed
@jdarwood007 jdarwood007 added this to the 3.0 Alpha 5 milestone Aug 10, 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