bitstarr / grav-theme-chassis

Grav Theme Boilerplate
5 stars 1 forks source link

use CSS brightness-fliter for color variations #2

Closed bitstarr closed 1 year ago

bitstarr commented 3 years ago

after dropping LESS, we were searching a replacement for darken() and lighten() functions. we tried to split the color in hsl values with custom properties, but it's not very intuitive atm.

maybe filter: brightness() is a good replacement. see https://css-tricks.com/little-things-on-my-personal-site/#filter-trick-for-links

bitstarr commented 1 year ago

ditching this. HSL calculations via custom properties are troublesome and produce extremely verbose and repetitive code. Filtering is problematic and can be unpredictable… So let's hope CSS color functions arrive quickly so we can sit out the 1 year browser adoption phase early.