I would like to use variables in CSS, so I am considering using either SASS or LESS for that purpose.
My problem, however, is that I will be deploying the project on a shared host, not a dedicated host with command line access.
I also don't like the idea of my users having to compile CSS files in their browsers using Javascript. (What if they have Javascript disabled?)
What is the best way to deal with this kind of situation? Will I have to resort to plain old CSS in the end? I hope not...
You'll never need to install Sass again! Npm is a command line interface that comes bundled with the server framework, node. js. It installs packages for us, as well as allows us to execute scripts and manage our dependencies.
The command to run Sass is sass --watch input. scss output. css where 'input. scss' is your main Sass file (with all your partials imported) and 'output.
Yes, we can compile SCSS/SASS to CSS without using any Node Command. With just one click you can compile SCSS/CSS to CSS. Click on the Extensions button on left side.
Compile the Sass or Less on your development machine, and push the compiled, minified CSS to your server.
You've got a contradiction.
If you would like to have full control over your site, you should get an own server, either dedicated or virtual. This would let you installing and running any stuff you want.
If you're not allowed to install and run custom software on your shared host, then you're not able to compile SASS on-the-fly. You have to compile SASS prior to uploading code to the server.
If you're not satisfied with a necessity of compiling SASS locally, you could automate it using a deployment technique like Capistrano or probably your IDE. The choice of a deployment tool highly depends on your development and hosting environments.
Another option is compiling LESS locally in clients' browsers. See http://lesscss.org/#usage. But i wouldn't recommend that for two reasons:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With