Skip to content

style: add theme css variables setup#2659

Open
yoreley777 wants to merge 4 commits into
testfrom
yoreley/TOOL-4783-theme-switching
Open

style: add theme css variables setup#2659
yoreley777 wants to merge 4 commits into
testfrom
yoreley/TOOL-4783-theme-switching

Conversation

@yoreley777

Copy link
Copy Markdown
Collaborator

Summary

Adds the initial CSS variables setup for theme switching and validates the approach with a small proof of concept in the header. Theme variables are now generated globally from the existing $themes map, and .breadcrumb-list was updated to consume --asf-background-white so the value changes when switching between light and dark theme.
Validated locally by toggling theme in Preferences and confirming .breadcrumb-list updates through the computed CSS variable value.

@yoreley777 yoreley777 requested a review from a team as a code owner June 19, 2026 00:24
Comment thread src/app/components/header/header.component.scss Outdated
@tylercchase

tylercchase commented Jun 23, 2026

Copy link
Copy Markdown
Member

I think our end goal is to entirely remove the theme-map variables and migrate to using material's defined variables where possible, which should remove most of the need for light-dark/themify calls.

Also this is what the site looks like when loading this PR
Screenshot 2026-06-23 at 1 53 21 PM

@yoreley777 yoreley777 deployed to dev-yoreley June 24, 2026 04:20 — with GitHub Actions Active

@lllarsen lllarsen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will probably want to change all users whos theme is light to user preferences as well as any user who got opted in to light theme will be stuck with light theme right? Maybe @williamh890 will have more wisdom here.

Comment on lines +15 to +16
color-scheme: light dark;
background-color: light-dark($asf-background-white, darken($asf-dark-primary, 5%));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this and just keep themify

@williamh890

Copy link
Copy Markdown
Collaborator

We will probably want to change all users whos theme is light to user preferences as well as any user who got opted in to light theme will be stuck with light theme right? Maybe @williamh890 will have more wisdom here.

We can start with just having new people default to system and see how it works. We can certainly go through and update the database to be system preferences, but that's not something we have done before.

@williamh890

Copy link
Copy Markdown
Collaborator

Also not something that can be done in a vertex pr

@lllarsen

Copy link
Copy Markdown
Contributor

We can start with just having new people default to system and see how it works. We can certainly go through and update the database to be system preferences, but that's not something we have done before.

This sounds like a reasonable option - one thing to note is it will cause potentially unintuitive behaviour where a logged in users theme will change depending on their logged in state... But, we can go in and change that if we get any complaints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants