Hi to all!
For my latest project I've preferred to use SCSS maps instead of simple SCSS variables.
$fontSizes: ( extraSmall: .75rem, small: .9rem, normal: 1rem, medium: 1.25rem, big: 1.5rem, extraBig: 2rem );
So I can get those values around my stylesheets as follow:
font-size: map_get($fontSizes, extraSmall);
I just LOVE this method, I've converted all my SCSS variables (excluding the atomic variables like $globalBorderRadius) into maps, so I can group them into a specific set of scss variables.
What do you think about SCSS maps?
Have you ever used them? If yes, is this a good way to use them?
Let me know! :)