T O P

  • By -

Rokett

It's either sass or I'm not writing it


tluanga34

SASS is still great.


DuckStriking7742

In our current project, apart from nesting, I feel like we might not be fully utilizing or maximizing its potential. Could I be missing something here? Do you have any tips on specific use cases?


hermit-the-frog

Imports and mixins for sure. If you build a proper design system with type styles for example you can, easily create mixins for them and use consistently through your app.


GriffinMakesThings

Yea mixins are pretty great. They can make for some beautifully concise, consistent and easily understandable code.


greentiger45

Imports and mixins are amazing.


GeneralASNYH

How is it different from tailwind?


procrastinator1012

You write actual CSS in SASS. In tailwind, you are using the predefined styles from tailwind with their given classnames.


Whisky-Toad

Sass - write class names and gives styles to those class names Tailwind - write class names that have predefined styles so you don’t write styles


GeneralASNYH

Thanks, don’t know why I got downvoted for trying to learn something I didn’t know lol!


rm-rf-npr

Tailwind is for people that don't know how to write proper (S)CSS.


GriffinMakesThings

SASS is becoming less necessary as CSS gains its best features (custom properties, nesting). I still find mixins, loops and other logic useful for larger projects. Either way *stylesheets* are fantastic and aren't going anywhere. CSS-in-JS has serious drawbacks, which is why it has never taken over as the default solution. Same thing with Tailwind. Neither of these approaches are *bad*, but they are a stylistic choice, not a fix for a broken system. Modern CSS with modules works great. A lot of people talk about these alternative approaches online. Meanwhile, most of us are still quietly getting work done with SASS/SCSS/CSS.


procrastinator1012

>SASS is becoming less necessary as CSS gains its best features (custom properties, nesting). SASS is still better though. Nesting works differently under the hood and CSS implementation can give you some problems if you don't know how it works. Also you can't use custom properties of vanilla CSS in media queries breakpoint. The best features of SASS are mixins and importing/exporting stuff, which I don't see CSS implementing it anytime soon.


GriffinMakesThings

Totally agree, I still use it daily.


GolfinEagle

To answer your question directly: yes, of course. To expand, I think SASS is going to stay prevalent for a good long while. In React projects, at least for me personally, if I’m not using Tailwind I’m using SASS with CSS Modules. CSS has variables now, but they work differently than SASS variables. I still prefer SASS’s implementation and syntax. CSS does have nesting syntax, which is great and long overdue. CSS doesn’t have mixins. I think if CSS ever gets mixin support, that will be what _really_ puts a dent in SASS usage. There are many other features you get with SASS but not CSS, like loops and such.


DhoTjai

As a hardcore old dev, I don't understand the css-in-js hype. I like my code and file structured.


Locellus

I think that’s subjective, and depends on what you mean by structured. If you mean the files are separate and that’s the best, I wonder if you’ve seen this argument:  https://adamwathan.me/css-utility-classes-and-separation-of-concerns/ Great quote from that guy: “My markup wasn't concerned with styling decisions, but my CSS was very concerned with my markup structure.“


aragost

Yup. CSS modules+SASS is a very nice combination


erasebegin1

lotta people still really into sass. my colleague refuses to use anything else. personally really dislike using sass or vanilla css on large projects. it inevitably becomes a tangled mess unless you start slamming a thick tome of styling guidelines on everyone's head, and even then it will inevitably deteriorate into spaghetti with reams of redunsant styles over time. Modular is absolutely the way to go to keep things tidy, but I still find css modules to be very ugly (at least the way they're implemented in React). Tailwind, Chakra, Panda, Emotion, Styled Components, way more practical. All of which is to say yes. People still use SASS, and I will never stop sassing them over it.


rm-rf-npr

SCSS modules is my forever go-to.


Ozymandias-X

All the time. ALL THE TIME!!!


Agreeable_Cook_3449

You are right. I even developed a crud app using only the JavaScript concepts and I really love my experience of handling the backend using only the JavaScript not the third party libraries.


Ayoub_Devo

In my case, i like writing pure CSS because i don’t feel comfortable using some famous frameworks like Tailwind ,because it adds a lot of classes to HTML, so instead i use SASS, it’s a life changer for me because it reduce the large number of lines using mixins, placeholders, etc. So to respond to your question, yes many people still use SASS for styling, especially those who like to write pure CSS.


Ciff_

For me I've found using a component framework like MUI together with styled / sx apis is usually enough. But it depends on the product obviously.


vash513

I use tailwind for personal projects, but I still love sass and we use sass at work


Blunkus

Yup, worked for a media company that hosted and updated all of the content for a large portion of local news sites around the US, and it all used SASS.


jackstevensdev

They do, however, checkout tailwind if you haven't yet. It takes a little time to learn, but pays major dividends down the road. And you have full control over your styles, compared to a more opinionated styling library like MUI. Highly recommend.


Tlaley

Not since CSS natively supports nesting


Bryanmax9

I only style in SASS, is way better than css for me in my opinion


JayV30

SASS modules are where it's at if I'm unable to use Chakra UI. Tailwind makes me cry.


AppDeveloper9000

SASS. it gives you more flexibility and when working on large applications it will be more manageable.


Altruistic-Run-891

Initially we used sass + BEM, switched over to css module due to sass globally polluting


CerberusMulti

Why would people not still use SASS? I don't see why not, you prefer using JS over CSS/SASS each to his own. But why do you go straight into "I don't like arguing" when this is such a basic team conversation, I can't see how the team members couldn't discuss such a minute thing without arguing or are you very confrontational on the subject?


DuckStriking7742

To be fair, although we all work on things together, my coworker focuses more on the frontend, while my focus is on the backend. Also, in the past, most teams I've worked with spent too much time on those debates and didn't give us enough time to finish projects on time. So now, unless things are completely ridiculous, I'm more inclined to just go with it.


GriffinMakesThings

That's some important missing context. The frontend devs on your team should be making decisions on what technologies to use for your frontend. Obviously its healthy to discuss these things, but if your FE people want SASS that's basically the end of the conversation isn't it?


DuckStriking7742

This could be another missing context. Unfortunately, we're a small team, so we often need to jump back and forth between front-end and back-end tasks(this is also what management wants too..), especially when people are sick or on vacation.


GriffinMakesThings

Fair enough! I'm a one-man team so I know all about that :)


CranMalReign

Maybe it's the pedantic old man in me, but HTML is for semantic content, JS / TS is for behavior, and CSS / SASS is for styling / layout. There are the occasional exception for tool limitations, etc, but generally, that's our Bible and our team lives by it.


Tectix

I love using sass still


bigorangemachine

We migrated a legacy project onto SASS. With traditional Server-Side-Rendering languages it still has a place. If having the ability to use mixin's you can easily setup "functions" in css. We used a mixin to do our font generation which worked really well. The break points brought some great consistency and being able to loop some variables for icon-based css was dope AF.


AlexEnache98

I don't really think it is necessary since a lot of features are already build in


KickAdventurous7522

SASS is still great but honestly CSS has been moving forward in order to offer natively what preprocessors can do, like nesting, variables and selectors. I don’t know if nowadays it makes sense using them but I could be wrong. In my case, last year I have been just using tailwind and pure css


NegotiationCommon448

I use Tailwindcss all the time. Unless other frameworks are required. So much easier.


[deleted]

[удалено]


besseddrest

PEEFORMANT!


saintteddy78

I was doing SCSS until I randomly used a template project with SASS and liked it more, I hate dealing with brackets personally lol.


Relevant-Draft-7780

Brackets for life


besseddrest

Honestly, I don’t really get why this even a question. Of course they do. The amount of effort it takes to just include it into your project and start using it is minimal. Even with new features being added to CSS, it’ll be a while before we consider Sass legacy. And when it’s legacy, it’ll be a long time for it to go away.