crosshare-org / crosshare

Crosshare is a free and ad-free community for crossword constructors and solvers
https://crosshare.org
GNU Affero General Public License v3.0
110 stars 28 forks source link

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

Open mdirolf opened 1 month ago

mdirolf commented 1 month ago

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 commented 1 month ago

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