3 ms·
I haven't used it in a number of years, but Stylus apparently lets you access hashes[0] using dots: palette = { blue: { light: hsl(201, 75%, 56%)
by Bluestrike2 8y ago
I haven't used it in a number of years, but Stylus apparently lets you access hashes[0] using dots:
palette = {
blue: {
light: hsl(201, 75%, 56%)
base: hsl(201, 75%, 51%)
dark: hsl(201, 75%, 46%)
}
}
palette.blue.light
// => hsl(201, 75%, 56%)
It was a fun preprocessor, even if you could go overboard with it (for instance, dropping colons). I used it in a few node projects, but didn't do much beyond that because it never really took off like Sass. Sass is, well, everywhere. Stylus, on the other hand, appears to be either dead or close enough to it. While I've got a list of issues with Sass--mainly because I prefer the SASS syntax over SCSS--none of them are dealbreakers.
0. http://stylus-lang.com/docs/hashes.html http://stylus-lang.com/docs/hashes.html