Wrote up a little CodePen to demo how Sass and Compass can help with theming.
This code is useful if you're writing a theme and want to easily change colours.
The problem, your design calls for multiple colour values. So in CSS you'd have to declare each of these values, for example.
Now, what if you want to create another theme that's red? That means, working out and changing all the colour values. Enter Sass.
Using variables such as:
Then calling them in your Sass file, you now only have to change one value to change all the values throughout the entire document.
Taking things a step further, you can also make use of Compass to handle all those vendor prefixes.
@include background-image(linear-gradient($base-light, $base-dark));
Like this post? Hire Me!