Just a question, every frontend dev I meet uses LESS or SCSS, very rarely pure SASS. To me it feels cleaner without brackets and semi-colons, and working with Ruby/HAML the indentation makes a lot of sense. Are there any downsides to pure SASS, or is it just a matter of taste/semantics?
For me, HAML and SASS are a pain to quickly read and understand. A lot of hierarchy is lost when you take out brackets and opening/closing tags.
Interesting! I find brackets a visual annoyance, so when I discovered SASS it was a hallelujah moment. I do all my prototyping in SASS/HAML nowadays just because of the simplicity, even if I'm not designing for a Rails project.
I felt that way in the beginning too, but after a while of forcing myself to stick with it, I now find it easier to read/scan original .sass than traditional css. It is cleaner and saves you a lot of typing.
For me, it's just because SCSS just feels like a natural extension of CSS, so using bracket keeps that feeling.
Most of my SCSS is just CSS, so extending in a way that gives new abilities, but lets you copy + paste CSS in makes sense. I never really had an issue with CSS anyway.
Exactly how I do this as well. +1
Agreed, if you've grown up writing CSS then SCSS syntax feels much more natural than HAML syntax.
It makes converting old projects to Sass easier, since any css file is a valid Scss file.
I've read a lot that people are moving on since it's the 'older' syntax. I would imagine its easier for those getting into preprocessors to use Scss since they can drop their normal CSS in, and start enhancing it from there.
I really like Sass. Much more simple. The indentation is strict and forces you to make it nice and clean. I gave it up for the same reason you're talking about. Everyone seems to be using Scss.
this. It's really awesome that you drop your pure css in and just start using it. especially when extending other stuff. I tend to use purecss.io, but there seems to be no sass/scss version of it, so I simply download the css, rename it to scss and import it into my main scss file. This way I can exten from it without even worrying about compiling and such.
Sass the preprocessor, SASS the syntax, no :) ?
Nope. just Sass.
SCSS is now considered the main syntax for the language, per this post: http://thesassway.com/editorial/sass-vs-scss-which-syntax-is-better.
SCSS is also arguably better in that it's more expressive, among other things (see post).
That being said, I haven't used SASS in about two years, so I can't say I'm terribly familiar with what it's up to these days.
As far as I know it's SCSS without brackets and semi-colons, I don't know if there are any other differences.
I prefer Sass over SCSS. It just makes more sense, it's very easy to read once you get a hang of the indenting. Less typing as well.
Wow, once I learned white space sensitivity dropping brackets and semicolons was the best thing ever. I would recommend trying SASS. If you are sticking with SCSS just because it is what you are used to you could be missing out on something that works even better for you. Now that I am comfortable with the syntax of SASS and Stylus going back to CSS is quite messy.
I use SASS. It's quicker.
I'm a big fan of using SASS and HAML formatting because it is difficult, if not impossible, to make syntax errors. It also forces consistency.
That being said, I think that code examples are better off presented as SCSS since it is way easier for both camps to understand--the assumption being anyone using SASS would already be familiar with the CSS/SCSS syntax.
SASS' author said SASS is considered the "old" syntax in a blog post. Most people I know use SCSS out of the box to avoid having to translate their code later from SASS to SCSS.
I personally prefer Sass' "old" syntax (without brackets and semicolons) since it's more succinct and fast to write in – nesting without brackets comes natural and the spaceship visual effect is at least attenuated. Plus, writing my JS in CoffeeScript makes the transition between the two languages even smoother.
Then again, it's just a matter of taste! :)
Personally, I'm a huge fan of using pure SASS I find it easier to read and write but for larger teams, not using SASS could be part of trimming the on-boarding fat of new hires for some. When I was talking with Gumroad about joining the team, they were using LESS. I asked why and the reason was mostly related to that. It's very easy to move between CSS, LESS, and SCSS but pure SASS does take a moment to get used to.
On a project of scale, SCSS (vs SASS) tends to be easier to collaborate in since vanilla CSS can compile in it. As a working example, when we built a style library at Trulia, it allowed different designers to jump in easier.
That being said, I have wrote my personal site's styles in SASS for fun.
My preference is to use the SCSS syntax because it so similar to plain CSS. My brain is already geared to scan CSS quickly. So, using SCSS syntax, being so similar to CSS, is just as easy. And with CSS4 moving in the direction it's going to provide similar functionality as SASS/LESS/etc., why not stay with the CSS syntax?
I prefer SCSS because it's like the regular CSS with superpowers.
SASS here as well. I was using LESS for years before I discovered SASS and how clean it looks. I would've seen no point in switching over to Sass if I would've had to keep the brackets and semicolons.
I think it's more of a comfort thing. I use scss, and just asked myself why not sass because you asked :P
I use brackets because it's a natural extension of CSS. At work however, I'm required to forgo brackets.
It has the same problem that I have with coffeescript--the indent-sensitive syntax makes it hard to get a good grasp on complex hierarchies.
Honestly, I don't care what anyone working with me wants to use. If you're fluent in SASS, HAML, Jade, whatever. As long as the code you write is clear. Especially when it's super-easy to convert between SASS/SCSS as needed.
Is there a way to write your own functions in SASS? As far as I'm aware you can only do that using SCSS.
@function my-calculation-function($some-number, $another-number)
@return $some-number + $another-number
EDIT: Gah...I can never get the code markdown to work here on DN.
Brackets and semi-colons serve as good start-end indicators.
The trade off is @include mixin-name... as opposed to +mixin-name but it's a trade off that's worth it for me in the end, in spite of the extra typing.
I think this is one of the biggest reasons, really. I'm not really into JS or PHP, so brackets have always been related to only CSS for me. If you're used to JS and PHP I can definitely see why brackets and semi-colons make more sense.
I actually use SASS. I used to use SCSS, but got sick of using delimiters.
Even though I prefer to remove brackets when using Stylus, I prefer the SCSS syntax with SASS. After a while I just don’t even think about them, other than knowing I have to put the in at sometime (with my editor doing most of that work for me).
So the argument that SASS feels cleaner is moot to me and kind of feels like the arguments people made for XHTML: “XHTML is better because it’s stricter!”, but why is that better?
I use and LOVE the Sass (the original) syntax!
I think it's more visually appealing to "scan" de code.
I'm with you Ib W.! I don't really know any of the pros/cons in comparison to SCSS, but I prefer no brackets and semi-colons. That's kind of my only reasoning, which I know isn't that great. Oh well!
I care quite a bit about maintainability and readability down the line. For me, using brackets and CSS-style notation makes things clearer to me and makes things a lot easier for other people to dip their toes into the Sass pool.
It also lets me integrate CSS very easily, which is a definite bonus.
I guess i'm in the minority :)
I don't understand how people can use SCSS or LESS, the markup is way to messy for me. Sass is the only way I work now.
Interesting discussion, the main anti-SASS "argument" (apart from people being used to brackets) seems to be incompatibility with normal CSS, or that people are worried about consistent workflow across many developers or projects.
For me the normal CSS issue is never really a problem, I use CSS snippets all the time. Just a matter of removing the brackets and semi-colons and it's SASS.
Same goes for consistency, SASS isn't that different, anyone who knows SCSS will know SASS. A few missing characters is the only major difference.