Skip to content

zdanowiczkonrad/dynamic-accent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎨 Dynamic accent color (primary) with plain CSS

This explores the ways to use a dynamic accent color (primary color) in a HTML app without preprocessors, without inline styles and without the upcoming yet poorly supported CSS variables.

First one uses a globally defined color and currentColor attribute, while the second one just uses proper class composition. Both examples uses a bit of JS that is purely to demonstrate the dynamic change of the primary color with respect to the DRY principle (one place to change the styles).

About

🎨 Dynamic accent color (primary) with plain CSS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published