Good morning!
Context
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.
Proposal
A. Replace the CSS best practice on https://dev.xwiki.org/xwiki/bin/view/Community/CodeStyle/XhtmlCssCodeStyle/#HCSS
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
.
Conclusion
Here’s my +1 for these changes.
Do you agree with this proposal?
Lucas C.