cferdinandi / kraken

A lightweight, mobile-first boilerplate for front-end web developers.
http://cferdinandi.github.io/kraken
MIT License
806 stars 81 forks source link

Make configuration variables default #266

Closed mckomo closed 7 years ago

mckomo commented 7 years ago

Making variables default allows them to be overwritten in your .scss file. E.g.

// In your main.scss
$font-size: 16px;
@import "kraken/src/sass/main.scss"
// SASS will render CSS with font-size == 16px
cferdinandi commented 7 years ago

While this is interesting, I think it defeats the purpose of having a centralized config.scss file and named variables.

This is 100% an opinionated code thing, and I totally appreciate that other people have different ways of working. But...

I like named variables (example, $color-primary) to have a consistent value throughout an entire stylesheet. If there's a need for an alternate color, font, font size, breakpoint, or so on, I'd like to see that as it's own named value in the config.scss, which I view as the centralized spot of truth for all variables.

I've worked on larger projects where variables are set in individual sass modules, and it becomes cumbersome to track down where values are set and what's really happening behind the scenes.

So all that said, I'm going to decline this pull request, even though it is an interesting feature. Sorry, and thanks!