sass-rando
sass-rando copied to clipboard
Version 3.0.0
The goals for v3 include:
- Making this work with dart-sass (now aka just 'sass') as the primary consuming build of sass
- Where possible, also support other builds and older versions of sass
- Make this more easily installable via npm
- Updating the underlying technologies (e.g. migrating to new versions of True and SassDocs, probably switching from grunt for task running to something else)
- Adding some new helpers for new use cases (e.g. css grid layouts)
- Just generally modernizing the repo.
Primarily the goal of this library will stay the same:
-
Futureproof uses of sass's
random()
function against upcoming changes.
- Current behavior:
random(3px)
will return 1, 2, or 3, since Sass strips the units right now. - Future behavior:
random(3px)
will throw an error, and to get the same result as above you'd need to do something likerandom(3) * 1px
, most likely. This will be an intermediary step. - Futurest behavior:
random(3px)
will return 1px, 2px or 3px. This is whatrando()
already does and will continue to do.
- Provide helpers so that, if you want to get a random number between -5 and 7, or randomly reorder a list, or slightly randomize a color's values, you don't need to think too hard about how to do it.