[3.0] Theme split (wave 4, part 25) — point the drop menu buttons at design tokens - #9467
Merged
live627 merged 1 commit intoAug 10, 2026
Conversation
The main menu and the user menu share one set of rules in index.css, and they were the largest group of hard-coded colours left in the file - the level 1 button, its active and hover states, and the notification counts beside it. #main_menu, immediately below them, has been reading --mainmenu-* since wave 2, so this finishes the band. Every token holds the value the rule has today, so nothing renders differently. Where theme-ref gives these a different value, that is a restyle and was not taken; only its naming was, which is why the states are _active, _hover and _active_hover suffixes on kebab-case names. The border shorthands stay shorthands. Splitting them into longhands would change what they reset, and .dropmenu a.active deliberately overrides only border-color of the shorthand above it. Signed-off-by: Mathias Albert <mathiaspapealbert@hotmail.com> Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
This was referenced Aug 9, 2026
Closed
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.
The main menu and the user menu share one set of rules in
index.css, and they were the largest group of hard-coded colours left in the file — the level 1 button, its active and hover states, and the notification counts beside it.#main_menu, immediately below them, has been reading--mainmenu-*since wave 2, so this finishes that band.20 tokens in a
/** Drop Menu Buttons **/group and 5 in/** Drop Menu Notification Counts **/, placed next to/** Main Menu **/rather than at the end of the file, so this does not collide with #9443 or #9448.Every token holds the value the rule has today, so nothing renders differently. Where
theme-refgives one of these a different value that is a restyle, and it was not taken — only its naming was, which is where the_active,_hoverand_active_hoversuffixes come from.The border shorthands stay shorthands. Splitting them into longhands changes what they reset, and
.dropmenu a.activedeliberately overrides only theborder-colorof the shorthand above it.Verification
Reading longhands off
CSSRule.styleproves nothing once a shorthand holds avar()— the CSSOM will not serialise it. So each rule'scssTextwas applied wholesale to a probe element, in cascade order, to reproduce the three states that cannot be triggered from a script, and a fixed list of 30 longhands read off the result:li a→a.active→a.active:hover)Plus the six real elements the rules actually match on the board index, 18 properties and the bounding rect each: 0 differences in 114 values.
One thing worth knowing for anyone repeating this: with
minimize_fileson, four of those values do differ,rgba(255, 255, 255, 0)→rgba(0, 0, 0, 0). That is SMF's CSS minifier rewriting the literaltransparent, which it cannot do inside avar(); both are fully transparent and nothing renders differently. The numbers above were taken with minification off so that the comparison is of the stylesheets rather than of the minifier.Issues References (Fixes|Related|Closes)
Related: #7933