kylelogue / mustard-ui

A starter CSS framework that actually looks good.
https://kylelogue.github.io/mustard-ui
MIT License
1.03k stars 65 forks source link

Combine config variables into a single defaults file #20

Closed dijitaltrix closed 4 years ago

dijitaltrix commented 6 years ago

Firstly thanks for releasing this it's good to see a new lightweight bottom - up css framework.

Like many others I've become used to Bootstrap and therefore having a single config file to tweak the css options.

I've created an example fork (https://github.com/dijitaltrix/mustard-ui) which pulls out all the variables into a single config file called 'vars/defaults.scss', this file is loaded by the main 'mustard-ui.scss' file, then another file is called with my specific site overrides which contains specific overrides of defaults.scss.

Personally I prefer this approach over mingling config in with the rest of the css, e.g. it helps when updating older sites as I can pull future changes knowing that my config will not be affected.

As long as the defaults file is always kept up to date the build should never fail due to missing variables, and I can refer to changes in that file to see whats new.

If it looks okay I'm happy to create a pull request.

kylelogue commented 6 years ago

Go for it!

TrackTik-Oliver commented 5 years ago

Nicely done, @dijitaltrix . I was frustrated with the $color-* variables being used everywhere. We only have need for a small-ish palette, so trying to determine which colors are used and which aren't was a bit of a pain (not a huge pain, ctrl-shift-f is your friend). This helps a lot. Thanks!

kylelogue commented 4 years ago

Closed as this is a personal preference. Fork this repo to implement as suggested.