Preprocessing CSS

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Wed May 25 02:19:10 PDT 2016


On 2016-05-25 09:35, Johannes Pfau wrote:
> Am Wed, 25 May 2016 08:28:01 +0200
> schrieb Jacob Carlborg <doob at me.com>:
>
>> On 2016-05-25 05:47, Vladimir Panteleev wrote:
>>> That said I don't see a lot of demand for preprocessing our CSS
>>> files at the moment.
>>>
>>> And, to add a data point, I have never used (or needed) neither
>>> SASS or LESS, despite creating a lot of web apps and even working
>>> at a web design company for a bit. I don't feel like I'm missing
>>> out.
>>
>> What you don't know you don't miss ;)
>>
>
> One nice feature in SASS is color manipulation: You can easily
> lighten/darken colors and use constants for colors to easily generate
> different color schemes.
>
> Since GTK has switched to CSS, quite some themes use SASS to
> easily provide different theme variants:
> http://worldofgnome.org/adwaita-gtk-theme-is-now-ported-to-sass/
> https://github.com/horst3180/arc-theme
> ...
>
> OTOH I don't know if you really need these features in web applications.

One of my favorite feature is nesting. The following Sass:

nav {
   ul {
     margin: 0;
   }
}

Would be translated to the following CSS:

nav ul {
   margin: 0;
}

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list