Click here to Skip to main content
15,499,155 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I thought this question would be dead easy to answer but it doesn't seem obvious to me just reading documentation.

I'd like to add a small amount of power (i.e. mainly syntactic assistance) to my CSS. I'm looking at SASS and LESS, which both seem to offer what I want, but, as the website is currently extremely lightweight, I'd ideally like to keep runtime JavaScript libraries out of the picture, at least for the time being.

Do these tools require runtime support of are can they be used as compilers that simply write out CSS?

I'd also welcome any advice about which might be the smoothest route into this for someone who has never used tools like these before.

Kind wishes - Patrick

What I have tried:

I've read a bunch of documentation but don't seem to be able to get a straight answer. I can try installing them and simply have a look at what I get but there is a risk that I might be installing someone else's idea of what I need, rather than just the bare minimum that I'd like to use for now.
Updated 8-Mar-21 4:11am

1 solution

You may need a JS library to handle the compilation of LESS/SASS to CSS, but even then it's not absolutely mandatory. In theory a standard LESS/SASS pre-processed into CSS shouldn't require any accompanying JS files.

For example, in our Java applications we use a Maven plugin which handles the compilation: we tell it where the source files are, what the target directory is, and that's all there is.

SASS Maven plugin[^]
SASS VS plugin[^]

The nature of pre-processing is to handle everything at compile-time rather than run-time, so there shouldn't be a dependency on any JS frameworks.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900