Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know where to use css, less and Sass? [closed]

I have knowledge of HTML, CSS, and jQuery. Recently I knew about Sass and less. As they both are the style sheet language I am a little bit confused about where to use both of them as CSS is already there and it is also widely used in every website. So how to know where to use these (Less, Sass) in that particular field.

Another doubt comes to my mind is, is it fine to use Sass and Less in wordpress instead of default CSS?

like image 637
NewUser Avatar asked Dec 28 '12 04:12

NewUser


1 Answers

As zzzzBov said, LESS and SASS are css preprocessors.

Basically, you pick one and write your style definitions in that language. When done you run it through the preprocessor and it will generate a normal CSS file for you. That normal file is what you would use in your site.

I'd highly suggest that you skip using SASS/LESS or any other preprocessor until you are more familiar with CSS in general.


A little more information about LESS.

LESS can be run ahead of time as an actual preprocessor OR you can simply link the less.js file and your .less file and let the browser do it. The problem with letting the browser do it is that every single browser that hits your site, for every single page, will have to "recompile" the css in order to render your site correctly. Considering you have zero control over the computers hitting your sites this might result in a "slow" site from some peoples perspective.

Further, that javascript only works in some of the browsers, further limiting it's usefulness.

Quite frankly, CSS is one of those things that you generally set up once for a site and leave alone for a year or more. So, it may simply just not be worth it.

like image 142
NotMe Avatar answered Nov 04 '22 12:11

NotMe