[3.0] Theme split (wave 2, part 2) — Move the button values into variables.css - #9351
Merged
Sesquipedalian merged 2 commits intoAug 3, 2026
Conversation
Theme::loadCss() has been asking for variables.css since 3.0 Alpha, at order_pos -2 so it lands ahead of index.css, but the default theme never shipped the file. The request is quietly dropped, so nothing breaks and nothing happens either. This adds it. The first group of tokens covers what index.css sets before it gets to any particular part of the forum: the html and body backgrounds, the body font and colour, the selection colours, form controls in their normal, hover, focus and disabled states, fieldsets and their legends, strong, headings, and the horizontal rule. Every value is the one that rule already had, so this changes no pixels. That is the point: it puts the vocabulary in place, with the names the new theme uses, so the parts that follow can convert their own section of index.css without also arguing about what the value ought to be. Changing what the forum looks like is a separate job from giving its values names. Verified by comparing computed styles across eight pages - board index, board, topic, posting form, search, profile, admin and help - for the eighteen selectors these rules reach and the fourteen properties they set. 1316 comparisons, no differences. Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
Second group of tokens: the .button family, which the quickbuttons and the inline moderation checkbox share the same rules with. Normal, hover, focus and active states, plus the border, radius, shadow, cursor, font size, text transform and the text shadow the active button carries. As with the first group, every value is the one the rule already had, so nothing changes on screen. The two hard-coded values left in these rules are deliberate: .pagesection .button uses the body link colour rather than a button colour, and the SimpleMachines#222 in the shared hover rule only ever reaches the quickbuttons, because the very next rule overrides it for .button. Neither has an honest name in this vocabulary yet. Verified two ways. Each of the nineteen tokens resolves to exactly the literal it replaced, read back from :root in the browser. Then computed styles for eleven button variants - plain, active, quickbutton, inline mod check, first and last in a buttonrow, inside a cat_bar, smalltext, and the three of those that can hold focus - across twenty properties. 220 comparisons, no differences. Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
This was referenced Aug 3, 2026
Merged
Merged
Merged
Closed
Collaborator
Author
Sesquipedalian
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Part of the #7933 split, wave 2 part 2. Stacked on #9350 — that one adds
variables.css; this one adds the next group of tokens to it. Until #9350 lands, this PR's diff shows both commits. Nothing else depends on the order.The
.buttonfamily.index.cssstyles buttons, the quickbuttons and the inline moderation checkbox through the same set of rules, so they move together:.button, .quickbuttons > li > a, .inline_mod_check--button-color,--button-font-size,--button-text-transform,--button-cursor,--button-border-*,--button-box-shadow.button:hover, .button:focus, .quickbuttons …--button-border-color_hover,--button-box-shadow_hover.button:hover, .button:focus--button-color_hover.button.active--button-bg_active,--button-color_active,--button-font-weight_active,--button-border-color_active,--button-text-shadow_active.button.active:hover, .button.active:focus--button-color_active_hover,--button-box-shadow_activeNames again match the ones #7933 uses, and every value is the one the rule already had. Nothing changes on screen.
Two values left hard-coded on purpose
.pagesection .button { color: #346 }is the body link colour, not a button colour. It happens to equal--body-link-color, and pointing it there would be a guess about intent rather than a rename.color: #222in the shared hover rule only ever reaches the quickbuttons: the very next rule overrides it for.button. There is no honest name for it in this vocabulary yet.Both are better decided by whoever changes the palette than by a mechanical substitution.
Testing
Fresh install on MySQL, Docker environment. Two passes:
:rootin the browser and compared against the strings they were lifted from — no mismatches. Since the substitutions are textually 1:1, that alone settles the normal case and the states that cannot be simulated..buttonrow, inside a.cat_bar,.smalltext, and the three of those that can hold focus — across twenty properties including all four border colours, the shadow and the text shadow. 220 comparisons, no differences.Error log clean. The unit suite does not reach CSS, so there is no test to add here.
Issues References (Fixes|Related|Closes)
Related to #7933, #9350