Is SCSS worth it?

I just completed a 30 hour video course on HTML and CSS. I now have a pretty good feel for the technologies but, of course, need practice for them to “sink in”. Toward the end of the course, the instructor introduced the SCSS syntax of SASS. It seems to offer few benefits over CSS. It also adds a layer of complexity (compiler, etc.) Is it worth it? At the moment, I’m not sure.

What are your thoughts? Thanks?

1 Like

I used to be against it, but overall, I think it’s worth it. We code using Sass at work and overall, I think it’s better. You can make use of variables, nesting, loops, and a lot of useful functions that are otherwise unavailable to you using regular CSS.

I could see situations where it might be overkill to set up Sass, so I wouldn’t use it 100% of the time. Sass is something I code daily and I couldn’t imagine having to do plain CSS and write the sheer amount of code I do. It would definitely take me longer to do the same amount of work.

2 Likes

Thank you for your experience with Sass. Do you use the Scss syntax?

Yes :slight_smile: .

This, especially.

Extend CSS when you need to extend CSS; otherwise stick with CSS.
You don’t need SCSS to align your divs or set background colors or…

4 Likes

After further review and advice, I’ve decided to learn Sass. I won’t use it all the time, but it’s good to know. Thanks.

I’d say if you’re doing a professional product, you should have a compiler as part of your workflow already. It’s pretty easy to throw up a simple Webpack instance for it or even easier for Parcel. I noticed that you’re interested in the JAMStack on your profile and if that’s the case, then you’ll need a compiler as part of your workflow anyway. JAMStack doesn’t mean manually developing individual HTML files like we did back in the 90’s. It creates reusable components that can be compiled into individual HTML files, but the majority of that gets abstracted away from the developer.

I use Sass almost 100% of the time. Hopefully the tooling around CSSNext or CSSNext itself will mature and I can stop using it, but for now Sass is an indispensable tool.

1 Like

Especially since you can stack an autoprefixer, along with a number of other useful things I imagine (CSS wise, we only stack an autoprefixer on top of Sass at work). I’d only not use a compiler setup for small clients (which I’d then feed them into wordpress most likely).

1 Like

You need to jump on the JAMStack train. :steam_locomotive::railway_car::railway_car:

1 Like

Never heard of it but I’ll start looking into it :slight_smile: .

My own advice is do not nest too many levels of CSS (1 or 2 max) as it makes it harder to follow the code. It also leads to creating unnecessary specificity, which makes things a lot more complex in the long run.

2 Likes

To give the other side of the view I’ve worked on both sides of the fence on large projects and small projects and I rarely find SCSS to be any real benefit to me in the way that I code.

Yes I found variables useful but we have those in CSS now. I found most of the other stuff I never used and neither did many of the other developers on the large project I worked on (over five years of constant development on one project (app and website)).

I do find SCSS useful for bleeding edge demos where you need to repeat and loop through hundreds of items but in general use I just didn’t seem to need any of it.

On small projects I work for a variety of clients and create a few main templates which they take over and virtually none of them wanted scss files and indeed would be overkill on a small site (I have coded literally thousands of templates over the last 20 years).

Many SCSS advocates seem to work on larger scale projects that take years to develop or are in ongoing development and in those cases I can see the value. However in my case most of my templates are coded the same day and are simple templates and easy to do in basic CSS. No need for any system or compiler as I could have coded most of the page before that was even set up.

That’s not to say that everyone should code the way I do and I do see that there could be huge benefits in some situations but just not enough for me to be a strong advocate.:slight_smile:

However, I do think its worthwhile taking the time to learn because in a few projects I’ve worked on they were already using SCSS so of course I had to follow suit. It always pays to keep up with these systems even if you don’t use them on your own personal projects.

Not being a programmer as such I tend to keep things as simple as possible because simplicity has its own rewards.

Of course I’m retired now and may just be just set in my ways. :slight_smile:

4 Likes

Thank you. I’ve spent the last two days studying Sass. My projects will be small and I agree with you. I prefer to become very experienced with CSS.

To counter this - there isn’t enough support (at least deemed by my companies standards) to use it.

My projects last anywhere from 2-4 weeks and I find much use in the sheer amount of code I write. A single homepage (panels only, not header/footer, etc) that I write in Sass can be upwards of 1500-2000 lines depending on what I have going on in there. Imagine that in CSS terms. That’s not including other partial files (Sass files) that include the header, footer, navigation, etc).

Overall good advice though :slight_smile: . I do think they should start with CSS and get a firm grasp of it. Sass is something additional to CSS and you will never make use of it properly (and get into bad habits) if you start with it off the bat. Just my 2 cents.

5 Likes

Yes I have no doubt that it suits you and the way you work and see that it can be useful. :slight_smile:

I’ve never had a problem with managing large css files. On the other hand just the look of the scss files is enough to stop me reading it easily and deciphering what everything does. It’s just another layer to go wrong or get in the way.

As time goes by I see that the most useful parts of a pre processor will likely find their way into basic css as has occurred with css variables (which are much more powerful than the preprocesor equivalent).

I guess in the end it boils down to personal choices and working practices. I’m not saying it’s of no value but that I have never found it to be invaluable :slight_smile:

5 Likes

This is what I think of any new web tech that comes as part of any tool: if it’s useful enough it will end up making it into the native language, if not it will become obsolete at some point.

2 Likes

If it makes any difference most companies hiring professional developers require knowledge of css pre-processors like less or sass. Companies want everything these days. The more you know doesn’t hurt.

2 Likes

That is very true, if you don’t want to get the job express your dislike for pre-processors. I did that once and it worked really well :slight_smile:
The job was at News Corp, and I came out with a headache from the interview. It did not look like a great place to work at.

1 Like

You’re probably definitely in the minority. Its only the design folk who tend to dislike them. Those people normally are not leads and managers.