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

Store color theme colors as rgb triples instead of rgb colors #516

Open
mdirolf opened this issue May 8, 2024 · 1 comment
Open

Store color theme colors as rgb triples instead of rgb colors #516

mdirolf opened this issue May 8, 2024 · 1 comment

Comments

@mdirolf
Copy link
Member

mdirolf commented May 8, 2024

If we set the css properties for theme colors to something like RR GG BB rather than #rrggbb then we can do things like background-color: rgba(var(--link) / 90%). This will let us ditch a few colors (at least --link-light-bg and --link-light-bg-hover, if not more) from the theme colors string, which is a bit bloated as is.

We can do this on a case-by-case basis if it's too big a project.

@mdirolf
Copy link
Member Author

mdirolf commented May 8, 2024

Alternatively we could start using https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color-mix which would let us do away with a bunch of the theme variables - support is just a bit lower than I'd like, though https://caniuse.com/mdn-css_types_color_color-mix

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

No branches or pull requests

1 participant