LESS and SASS allow us to use CSS nested rules; however, they require us to install their components on the web servers.
Is it possible to use similar feature without installing anything on the server? Ma开发者_Go百科ybe by using JavaScript, jQuery, etc. I could achieve this.
Thank you,
Just like people who minimize javascript files as part of deployment (without installing anything on the server), you can process LESS files into regular CSS files as part of your deployment or packaging step. The tools can run on a developer's computer and be used once at deployment time and not have to ever install any executables on the server.
I'm sure there are many LESS compiler options, but here are a couple:
- LESS CSS on Windows
- dotless
Less can run in a strictly client-side mode using JavaScript. Just include less.js
in your page.
http://lesscss.org/#guide
in short, yes, http://www.w3schools.com/css/css_grouping_nesting.asp.
Not quite the SASS syntax but accomplishes the same effect. To further the answer Javascript can be used to apply the nested CSS dynamically.
精彩评论