Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate colors #394

Open
domenic opened this issue Mar 17, 2022 · 0 comments
Open

Consolidate colors #394

domenic opened this issue Mar 17, 2022 · 0 comments

Comments

@domenic
Copy link
Member

domenic commented Mar 17, 2022

@hidde has been doing some great work to improve our color contrast. However it required updating lots of separately-declared colors in different files.

It'd be nice if the colors were centralized somewhere, and you could just change them in one place!

Ideas:

  1. Use a centralized CSS file with all the colors stored in CSS variables, and update all other CSS files to reference those CSS variables. Either @import it or add <link> tags into all the templates.
  2. (1), but add some build process that inlines it or does build-time variable substitution, so as to avoid extra HTTP requests.
  3. Try to figure out something that doesn't involve any new files, i.e., reduce the duplication but probably still have some. For example we could make sure all specs share the same colors by putting CSS variables into standard-shared-with-dev.css, and then, for example, standard.css, and HTML's specific styles, could reference those variables. But we would probably still need duplicated definitions in whatwg.org/style/subpages.css since there's no shared stylesheet between the spec and webpage styles, currently.

(3) seems like a pretty easy starting point.

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

No branches or pull requests

1 participant