You can both compile it on the server or on-the-fly client-side with less.js.įor production, I recommend setting up a build script that compiles it (in NodeJS this is piece of cake with Grunt and grunt-contrib-less).Įdit: There are also other options worth mentioning, even if I'm using and recommending LESS. Yes there is, it's called LESS and it really adresses most CSS's code readability problems. JavaScript - for applying additional or dynamic logic to your content.There are 3 (depending how you look at it) components to a web page: You also have the option of using JavaScript to set styles, but that is not recommended because you should avoid applying styles within JavaScript since JavaScript is meant for logic, not styles. Doing things the other way around (IE first) is much harder. Also, don't develop for Internet Explorer first. The basic idea here is that you should make the lowest common denominator (Internet Explorer usually) work "good enough" that it doesn't take away from the user experience, and provide the niceties for users with better browsers.
Is there no alternative to lightwrite how to#
You'll need practice in learning how to make things degrade gracefully in browsers that don't support features. The key to understand about CSS is that its purpose is to define the style of an HTML document and it should be separate from the content. Browser support for CSS should not be a major concern (in most cases) once you learn the ins & outs of CSS.