vrimar / construct-ui

A Mithril.js UI library
https://vrimar.github.io/construct-ui
MIT License
287 stars 23 forks source link

Customization #30

Closed raykyri closed 4 years ago

raykyri commented 4 years ago

Is there any recommended way to customize styles, e.g. override the primary intent colors?

kczx3 commented 4 years ago

You should just need to override the color variables in a local sass file and import the entry point of construct’s sass files. You may need to import another file or two prior. _variables.scss

vrimar commented 4 years ago

@kczx3 is right, the ideal way would be to override the variables, here's an example. If you're not using sass in your project it's a bit of a pain to introduce yet another dependency. I may look into a css-in-js solution in the future to allow a more versatile approach to themeing.

raykyri commented 4 years ago

That makes sense! Didn't see the !default flag there.

frie commented 11 months ago

There are a couple of "hard-coded" color stylings (background:white;) in the scss sources which do not make use of the color variables, so there currently is no way to change the coloring to a dark theme without touching the sources. At some places background: $white; is coded, which may be overriden by defining $white as black color... See .cui-list class