Relative colors are awesome! I really really enjoy the new light-dark() function too. Makes custom themes a breeze. Super cool for user-customizable theming too. I am currently using them to build a open-sourced NPM package called "semantic-props" with light-dark weighted colors like `--primary-500-300` among other custom properties for fonts and sizing. It's still a WIP though, the branch I am using isn't even published LOL.
The only thing I wonder is if the math involved can become a performance issue. I know CSS feels like it's "always fast enough" but if you use that amount of complex CSS in large projects with TONS of styles etc. then things actually start to slow down due to CSS parsing and rendering. Color math is heavy, color space conversion is heavy math. Have you tested/seen a test where someone evaluates how performant the Browser have implemented all that?
I'm not a web developer (hardware guy by trade) and have only started dabbling with CSS as I have some output from a Python script/programme which I wrote. I can see this being pretty useful and cool, not sure I would use it to this degree. The & as the nested selector is a neat trick that I can already see me using.
Relative colors are awesome! I really really enjoy the new light-dark() function too. Makes custom themes a breeze. Super cool for user-customizable theming too. I am currently using them to build a open-sourced NPM package called "semantic-props" with light-dark weighted colors like `--primary-500-300` among other custom properties for fonts and sizing. It's still a WIP though, the branch I am using isn't even published LOL.
The only thing I wonder is if the math involved can become a performance issue. I know CSS feels like it's "always fast enough" but if you use that amount of complex CSS in large projects with TONS of styles etc. then things actually start to slow down due to CSS parsing and rendering. Color math is heavy, color space conversion is heavy math. Have you tested/seen a test where someone evaluates how performant the Browser have implemented all that?
I'm not a web developer (hardware guy by trade) and have only started dabbling with CSS as I have some output from a Python script/programme which I wrote.
I can see this being pretty useful and cool, not sure I would use it to this degree. The & as the nested selector is a neat trick that I can already see me using.
the like and subscribe made me jump