13

I rarely see frontend devs use pure SASS...why?

almost 9 years ago from

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?

41 comments

  • Daniel SamuelsDaniel Samuels, almost 9 years ago

    For me, it's just because SCSS just feels like a natural extension of CSS, so using bracket keeps that feeling.

    14 points
  • César MigueláñezCésar Migueláñez, almost 9 years ago

    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.

    14 points
    • Darth Bane, almost 9 years ago

      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.

      6 points
    • Gjermund GustavsenGjermund Gustavsen, almost 9 years ago (edited almost 9 years ago )

      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.

      0 points
  • Anthony Garand, almost 9 years ago

    It makes converting old projects to Sass easier, since any css file is a valid Scss file.

    9 points
  • Chris CampbellChris Campbell, almost 9 years ago

    http://sassnotsass.com/

    4 points
  • Kyle LKyle L, almost 9 years ago

    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.

    3 points
  • Wes OudshoornWes Oudshoorn, almost 9 years ago (edited almost 9 years ago )

    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.

    Example:

    @include radius(10px);

    vs

    +radius(10px)

    3 points
  • Aaron WadeAaron Wade, almost 9 years ago (edited almost 9 years ago )

    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.

    3 points
    • Daniel WinterDaniel Winter, almost 9 years ago

      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.

      0 points
  • Albert TreatAlbert Treat, almost 9 years ago

    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.

    3 points
    • Darth Bane, almost 9 years ago

      As far as I know it's SCSS without brackets and semi-colons, I don't know if there are any other differences.

      0 points
  • Gabe MartinGabe Martin, almost 9 years ago

    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.

    1 point
  • Daniël van der Winden, almost 9 years ago

    I use SASS. It's quicker.

    1 point
  • Al Hertz, almost 9 years ago

    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.

    1 point
  • David FrossDavid Fross, almost 9 years ago

    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?

    1 point
  • Ivan PrignanoIvan Prignano, almost 9 years ago

    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! :)

    1 point
  • Susan LinSusan Lin, almost 9 years ago

    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.

    1 point
  • Jeff EscalanteJeff Escalante, almost 9 years ago

    I agree, if I do ever have to uses sass, I use the sass syntax. Mostly use stylus these days though, you can use brackets and semis or not (even intermixed) so a single syntax fits everyone's style. It also interops better with node, since the parser is in javascript. If anyone is interested I have quite a nice stack of libraries you can use with it as well.

    1 point
  • Catalin CimpanuCatalin Cimpanu, almost 9 years ago

    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.

    1 point
  • Darth Bane, almost 9 years ago

    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.

    0 points
  • David SimpsonDavid Simpson, almost 9 years ago

    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.

    0 points
  • Jodi WarrenJodi Warren, almost 9 years ago

    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.

    0 points
  • Oscar MarceloOscar Marcelo, almost 9 years ago

    MEEEE!!

    I use and LOVE the Sass (the original) syntax!

    I think it's more visually appealing to "scan" de code.

    0 points
  • Jake Lazaroff, almost 9 years ago

    Is there a way to write your own functions in SASS? As far as I'm aware you can only do that using SCSS.

    0 points
    • Darth Bane, almost 9 years ago (edited almost 9 years ago )

      Like this?

      @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.

      0 points
  • Ragnar VorelRagnar Vorel, almost 9 years ago

    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.

    0 points
  • Jason BlockJason Block, almost 9 years ago

    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.

    0 points
  • Lucas AlmeidaLucas Almeida, almost 9 years ago

    I prefer SCSS because it's like the regular CSS with superpowers.

    0 points
  • Account deleted almost 9 years ago

    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?

    0 points
  • Jonathan SuhJonathan Suh, almost 9 years ago

    I also write a lot of JavaScript and PHP and brackets are common-place when writing both. Although the argument can be made that indented-Sass requires less typing, brackets and semi-colons come a heck of a lot more naturally for me.

    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.

    0 points
    • Darth Bane, almost 9 years ago

      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.

      0 points
  • Stepan ParunashviliStepan Parunashvili, almost 9 years ago

    I think it's more of a comfort thing. I use scss, and just asked myself why not sass because you asked :P

    0 points
  • ポール ウェッブポール ウェッブ, almost 9 years ago

    I use brackets because it's a natural extension of CSS. At work however, I'm required to forgo brackets.

    0 points
  • Daryl GinnDaryl Ginn, almost 9 years ago

    I actually use SASS. I used to use SCSS, but got sick of using delimiters.

    0 points
  • Kelly LawrenceKelly Lawrence, almost 9 years ago

    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!

    0 points