studiometa / scss-toolkit

A small and configurable SCSS Toolkit to boost your project! 🚀
MIT License
5 stars 0 forks source link

Improve helpers configuration #24

Closed titouanmathis closed 5 years ago

titouanmathis commented 5 years ago

Proposal for a more tailored configuration the classes generated. The colors, displays and layers helpers can now be generated with (or without) the --force and --<breakpoint> modifiers by setting the value of the following variables:

$colors-with-force: false !default;
$colors-with-breakpoints: false !default;

$displays-with-force: false !default;
$displays-with-breakpoints: false !default;

$layers-with-force: false !default;
$layers-with-breakpoints: false !default;

This PR also includes a proposal for a new set of opacity utility classes (see 692ba66).

perruche commented 5 years ago

Great addition to be able to remove/filter some of the generated classes !

Not sure about the benefit of the opacity utility classes. We usually mainly use opacity for css effects (toggling from 0 to 1 or 1 to 0 mostly), and on some rare UI elements. Should this be handle in a project, rather than the toolkit ?

titouanmathis commented 5 years ago

Not sure about the benefit of the opacity utility classes.

I added in my latest project and found it quite useful to handle a dark/light theme switching without having to change each shade of black in a shade of white. It might not be very useful on most project, indeed, but I thought it had not a too big impact on the compiled CSS size while still being useful in some cases.

@studiometa/studiometa-scss-toolkit team, any thoughts on the subject which might help us take a decision?