[Interest] pre-processing for Qt widget stylesheet

Konstantin Tokarev annulen at yandex.ru
Wed Aug 12 15:25:33 CEST 2015



12.08.2015, 10:02, "Alejandro Exojo" <suy at badopi.org>:
> El Wednesday 12 August 2015, André Somers escribió:
>>  I guess any template engine would do, really. Perhaps take a look at
>>  grantlee?
>
> The problem is that Sass is more than a template engine. Is a language crafted
> for generating CSS. It has functions for colors, understands selector
> inheritance, and a lot more. See for example:
>
> http://sassymothereffingtextshadow.com/
>
> OK, probably not the best example, since very rarely you make use of loops in
> Sass code. The next is something not easily achievable with a normal template
> language, and is one of the most interesting use cases:
>
> http://sass-lang.com/guide#topic-3


There are also ready to use mixin libraries for SASS e.g. http://bourbon.io/

>
> The only solution I can think of, unless libsass has hooks for extension
> points for your problems, is pre and post process the Sass/CSS code. Try to
> see if there is some way that you can "tag" the elements with the invalid
> pseudo-classes (a diferent pseudo-class or an ad-hoc class that you use for
> that), and use some regular expression to do replacements.


-- 
Regards,
Konstantin



More information about the Interest mailing list