To me, it’s like learning an entirely new language. I’m already familiar with CSS, and learning how to use all these crazy variables and mixins just seems like a lot of work for a little extra convenience.
If I were starting an entirely new site, I’d definitely give SASS a try, though
I am testing SASS (and LESS) right now as well. Pre – processors have several benefits (which have been mentioned already) but they also have several drawbacks:
(1) You need to install and setup additional things on your computer. You need to do this on every computer you use for work. Plain CSS can be edited with even the most basic editor (e.g. Notepad) which means you can work on them from any computer even if you don’t have access to your own workstation.
(2) If you work with other people then EVERYONE should use the same pre – processor (this includes your clients if they might tweak the CSS code). CSS is a universal standard. SASS is not.
(3) Currently most editors do not support SASS. Those that do (most of them with plugins, which might not work when new versions of the editor are released) do so in a limited way. For example they might color code your SASS but code hinting and auto-complete might not work as good as with CSS (or they might not be available at all)
(4) Debugging your CSS code (e.g. with Firebug) becomes less direct and you might have to install yet more things on your computer to overcome this issue.
You have to weight the pros and cons and decide if pre processors are for you. For a website with 20 pages I doubt that SASS will actually help you. Then again, if you have some extra time available, you might try SASS out for a project just to learn the technology.
If the popularity of pre processors continues to increase then many of the above issues (editors, debugging etc) might be resolved in the next 1-2 years. At that time we might also know which pre processor will “win”, so you will not have to waste your time learning a pre processor that will soon die.
Finally, as somebody else said, if you are on Windows try LESS first. I found no good apps to compile SASS on windows, while i really like SimpLess for Less. Not only it compiles your code, but it also uses prefixr, which means you don’t need to use mixins to get cross-browser support. You just enter the standard CSS rules in your Less code and SimpLess will add vendor specific prefixes if and when needed.
@Zoom A response
1) Yuh you need to install the preprocessor, but chances are your already setting up some kinda of development server on your own machine and its not hard to install. You can edit it with notepad all you need to do is compile it at some point, you can edit the output css by hand aswell if your away from a comiplers
2) While its good practice to be on the same page about what preprocessor your using in a development team yes but not essential, As for not using it incase the client decides to change something later on if you apply that logic you shouldn’t use any third party libraries in designs either.
3) Syntax support for editors is like alot of things, you ain’t always going to have it available, doesn’t mean you shouldn’t use it, Probably quite alot of editors don’t support html5 syntax either. And the really liked code editors do support Sass, either way you should use Scss syntax, which is basically CSS with the added options of Sass functionallity available i.e. you can copy and paste a css file into a scss and it will compile (unless you’ve not got your css correct)
4) Debugging, while it may add a extra layer of complexitity benifits are greater, plus you can get an addon for firebug that allows you to debug to scss, plus with sass you can compile the code with line-number comments automatically making it easy to reference what piece of code has generated what rules in the css.
And tbh I doubt either Less or Scss will die in the next 1-2 years, twitter bootstrap uses less and its a fairly popular framework, but there are sass versions out there. There are aother sass frameworks out there too, like zurb, plus sass has compass a fairly extensive library of extra functionality
If you or somebody else edits the CSS directly then you will have to incorporate all those changes to your SASS file before you can continue working. Otherwise when you recompile your SASS all those other edits will be overwritten.
Pre processors do not allow you to do anything more than what you can already do with plain CSS. Their main “selling point” is convenience and speed of coding. Unfortunately using pre processors currently also results in several inconveniences (need for compilers and additional apps) and things that can reduce your coding speed (less than ideal support in editors and IDEs when compared with plain CSS).
So it is not about if you can or can’t do something. You can do everything you want with a per-proccessor and without one. It is about how convenient and fast it is to do something and a pre processor is not always the right answer. The right answer depends on the project (how big?), on the way you code (what level of support does your favorite editor / IDE have for SASS?) and how much of the power of the pre processor you actually need.
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".