When discussing @tkrieck 's proposal, I noticed that our CSS codestyle didn’t say to not hardcode values in CSS, but just: don't hard code colors in properties - use ColorTheme variables (use the up to date Flamingo ColoTheme variables). In my opinion, our policy should be a bit larger than that.
don’t hard code colors in properties - use ColorTheme variables (use the up to date Flamingo ColorTheme variables)
with an updated best practice:
Some properties must not be hardcoded. Instead they must use ColorTheme variables (use the up to date Flamingo ColorTheme variables). Those properties are:
Colors
Font weights
AND
B. Add three LESS variables to the Flamingo ColorTheme: @font-weight-regular, @font-weight-semibold and @font-weight-bold.
For consistency with our current system. All of the other colorTheme variables are LESS. Both types of variables are not transposable unfortunately so I’d rather keep things consistent.
It’s a broader discussion and moving from LESS to CSS variables comes with complications. None of the LESS utility functions work with CSS variables so we’d break a lot of user SSX if we switched without a proper migration or at least keeping a LESS fallback (which would come at a performance cost).