+1
Answered

Flex Templates--Will they use LESS or SASS, or both?

Robert Dundon 10 years ago in BLOX CMS updated by Christine Masters 9 years ago 2
Hi There!

I and some other colleagues noted that the Flex templates will use Bootstrap , which can use LESS or SASS http://docs.townnews.com/kbpublisher/Flex-Overview_9180.html#Bootstrap.

Has TN already chosen one or the other for use? Or will there be an option?

Thanks!


Answer

Answer
Answered
We aren't using SASS or LESS right now with Flex, but we do have some really interesting tricks we've employed. For one, we have some sections of CSS which are now included in page - which means that you can run UTL in that CSS.

This allows you to do things like conditionals which check the section and then implement CSS if it matches. Or, using a variable color defined in your page customization as the background for a custom block or custom design.

This should be used sparingly, of course, because you don't want 10,000 lines of CSS on your front page.

But it does allow for some programmatic changes, and it gets rid of a separate site CSS http call.
I'd vote or SASS, but I really doubt TN will do CSS preprocessing on the fly. (I'd be happy to be proven wrong, though.)

I'd settle for them allowing us to use UTL inside their stylesheets to create variables and loops, though .scss files would be better.
Answer
Answered
We aren't using SASS or LESS right now with Flex, but we do have some really interesting tricks we've employed. For one, we have some sections of CSS which are now included in page - which means that you can run UTL in that CSS.

This allows you to do things like conditionals which check the section and then implement CSS if it matches. Or, using a variable color defined in your page customization as the background for a custom block or custom design.

This should be used sparingly, of course, because you don't want 10,000 lines of CSS on your front page.

But it does allow for some programmatic changes, and it gets rid of a separate site CSS http call.