Thanks for the response. Your mention of Bootstrap brings up another point that I've found while researching this. If you intend to use one of the CSS frameworks like Zurb Foundation or Bootstrap, using their chosen CSS compiler is a must if you really want to have a chance of robustly modifying their default styling. Otherwise, you don't have any access to their variables and macros and have to reinvent that in your own home grown solution.
Dave On Tuesday, March 12, 2013 8:17:01 PM UTC-5, Steven Kryskalla wrote: > > On Tue, Mar 12, 2013 at 5:32 PM, David Hess > <[email protected]<javascript:>> > wrote: > > However, why would those tools be better than just using Jinja2 to > > accomplish the same thing by passing CSS templates through it? > > > > Does anybody have opinions on the pros and cons of using Jinja2 this > way? Am > > I missing something obvious? > > Jinja2 is a general purpose templating language for text, so it > doesn't understand the CSS language or have any special features for > working with CSS. > > For example, look at the nesting / mixin / inheritance features of > SASS. You could get something similar to work using jinja2 blocks, but > you'd have to write some custom code yourself to output the proper > CSS. If the preprocessor is implemented correctly, it guarantees that > the output is valid CSS. > > If you just want to do something simple like using variables so you > don't have to repeat hex codes for colors everywhere, then I think > jinja2 would work fine. I've done that a few times and jinja2 works > great for that type of thing! > > But if you have very complicated CSS then using the advanced features > of a preprocessor like SASS or LESS would probably give you more > benefit. Look at how bootstrap uses LESS for example: > > https://github.com/twitter/bootstrap/tree/master/less > > -Steve > -- You received this message because you are subscribed to the Google Groups "pocoo-libs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pocoo-libs?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
