Skip to content

[3.0] Theme split (wave 5, part 1) — give the last hard-coded colours in index.css a token - #9496

Open
albertlast wants to merge 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/theme-index-css-tokens
Open

[3.0] Theme split (wave 5, part 1) — give the last hard-coded colours in index.css a token#9496
albertlast wants to merge 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/theme-index-css-tokens

Conversation

@albertlast

Copy link
Copy Markdown
Collaborator

Description

Wave 4 tokenised index.css area by area and left a remainder: 55 declarations that no area owned, scattered the length of the file. This takes those, so every colour the default theme draws now resolves through variables.css.

Most are one-offs — the forum title link, the current page number, the status words, the COPPA contact block, the error file viewer, the warning level bars, the theme picker, the auto-suggest list.

Three are not. The sheen gradient on raised controls, the one on their hover state and the one on overlay surfaces are each shared by a long selector list spanning menus, quick buttons, popups and post options, so they are named for what they are (--raised-bg, --raised-bg_hover, --overlay-bg) rather than after any one component that happens to use them.

This is not meant to change what the forum looks like, and does not. Every token is seeded with the literal it takes over from. Verified by recording the computed color, background-color, background-image, all four border colours, box-shadow, outline-color and text-shadow of every element on twelve pages — board index, a topic, the posting form, the profile, the stats, help, search, the calendar, personal messages, the admin centre, its permission grid and its theme list — before and after the change:

baseline records: 4254
after    records: 4254
computed-style differences: 0

The one literal left behind is the diagonal stripe the progress bar draws over its fill, which is a translucent white texture rather than a colour.

Why now

This is the remainder wave 4 recorded as outstanding, and it is a prerequisite rather than a loose end: with these colours hard-coded, a dark mode cannot reach them. #wrapper keeps a white background, the .titlebg and .subbg headings stay #555 on a dark bar, and the three sheen gradients stay pale. Part 2 of this wave is the dark mode itself and is stacked on this branch.

Part 1 of wave 5 of the #7933 split.

Issues References (Fixes|Related|Closes)

Related #7933

Wave 4 tokenised index.css area by area and left a remainder: 55 declarations
that no area owned, scattered across the file. This takes those, so that every
colour the default theme draws now resolves through variables.css.

Most are one-offs - the forum title link, the current page number, the status
words, the COPPA contact block, the error file viewer, the warning level bars.
Three are not: the sheen gradients on raised controls, on their hover state and
on the overlay surfaces are each shared by a long selector list spanning menus,
quick buttons, popups and post options, so they are named for what they are
rather than for any one component that uses them.

Every token is seeded with the literal it takes over from, so this is not meant
to change what the forum looks like, and does not. Verified by recording the
computed color, background, background-image, border colours, box-shadow,
outline and text-shadow of every element on twelve pages - the board index, a
topic, the poster, the profile, the stats, help, search, the calendar, personal
messages, the admin centre, its permission grid and its theme list - before and
after: 4254 elements, zero differences.

The one literal left is the diagonal stripe the progress bar draws over its
fill, which is a translucent white texture rather than a colour.

Signed-off-by: Mathias Alberts <mathiaspapealbert@hotmail.com>
Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
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.

2 participants