Goodbye SASS, welcome back native CSS
Goodbye SASS, welcome back native CSS
Sass has established itself as a powerful preprocessor installed locally, forming the backbone of my projects for over a decade. It enabled…
Goodbye SASS, welcome back native CSS
Sass has established itself as a powerful preprocessor installed locally, forming the backbone of my projects for over a decade. It enabled…
Yeah CSS is now decent. The only problem is that the nesting is not very well supported yet. It’s something like only browsers > 2023 and let’s be realistic people run old machines.
We still see somewhat old browsers, especially from people using Safari on Apple devices (because IIRC it only updates when you update the whole OS). But it's a lot better than it used to be thanks to most browser having auto-updates
Definitely not widely supported enough. Made the switch from sass back to css quite a while ago and let postcss polyfill less supported features like nesting.
I've read interesting argumentation against nesting. I'm not confident in whether it's more useful or not, in some situations or in general.
Trust me, you'll code faster and your CSS will be way more readable.
I, uh, hate that radius calculation. Why does the radius need to be reactive? What do you stand to gain over just setting to like 3 or 4px and moving on with your life?
Junior webdev points.
I'm not sure how this relates to the shared post. I'm just searched the article for "radius" and only found one example where a variable is defined then used later. Were you talking about this ? Or can you clarify what "radius calculation" you hate ?
They're referring (I believe) to the screenshot right at the top of the article, which includes this absurd calculation:
undefined
border-radius: max (0px, min(8px, calc( (100vw - 4px - 100%) * 9999)) );
My guess (hope!) is that this is not 'serious' code, but padding for the sake of a screenshot to demonstrate that it's possible to use each of these different features (not that you should!).
still can't do mixins and extends though. :(
HTML tends to absorb all its best kludges. I put off learning JQuery for so long that the features I wanted became standard.
I still reach for sass for a lot of things, but now you don't have to, which is really nice
Good riddance, I say. Web dev is infested with layers upon layers of tools that attempt to abstract what is already fairly simple and straightforward to work with. We're beyond the days of needing to build buttons out of small image fragments, and JS is (slowly) becoming more livable in its raw form. I welcome anything that keeps the toolchain as simple as possible.
At my company I start all new projects without a framework. I try to write things in templated backend frameworks with no javascript on the frontend. If I need javascript, I try to use web components, styled with modular css in the shadow dom.
However, this sometimes requires an absurd amount of build tool configuration with webpack in order to get static asset and typescript loading working just perfectly. I end up kind of just writing my own framework instead
I like that css now has variables, but why that syntax?
I think to make sure they don’t clash with existing identifiers
I could understand declaring with --foo
, but then referencing should be either var(foo)
or just --foo
, not the combination var(--foo)
. I don't get why the grammar has to work that way.
@pcouy The URL is broken.
It seems to be working for me, it's weird. I've updated the post with the same URL anyway, and you can try https://scribe.bus-hit.me/@karstenbiedermann/goodbye-sass-welcome-back-native-css-b3beb096d2b4 if that still does not work