15 points

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.

permalink
report
reply
3 points

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

permalink
report
parent
reply
-1 points

Yeah, exactly.

permalink
report
parent
reply
3 points

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.

permalink
report
parent
reply
0 points

Yeah, I was reading about PostCSS the other day, but still too lazy to change my environment. To be fair I only need the nesting polyfill and some kind of minifier, the rest I can live with native stuff.

permalink
report
parent
reply
1 point

Lightning CSS is also great. A minifier at its core but also includes transpiling for older browser

permalink
report
parent
reply
1 point

Their machines might be old, but their browsers auto-update.

permalink
report
parent
reply
0 points

Until you find they’re using and old version of macOS… or Windows 8. 😂

permalink
report
parent
reply
1 point

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.

permalink
report
parent
reply
1 point

Trust me, you’ll code faster and your CSS will be way more readable.

permalink
report
parent
reply
10 points

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?

permalink
report
reply
14 points

Junior webdev points.

permalink
report
parent
reply
-2 points

Cool. Help me learn then by answering my questions.

permalink
report
parent
reply
7 points

He did

[…] 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

AKA you gain nothing.

permalink
report
parent
reply
2 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 ?

permalink
report
parent
reply
4 points
*

They’re referring (I believe) to the screenshot right at the top of the article, which includes this absurd calculation:

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

permalink
report
parent
reply
3 points
*

It‘s used in Facebooks css. Remembered it from a nice article from Ahmad Shadeed. And while this limbo sure has some usefulness, it‘s way too obscure to use for the fun of it.

To add to this: CSS really has come a long way. This border-radius example can be done with Container Queries by now, which has quite good support already.

permalink
report
parent
reply
8 points

still can’t do mixins and extends though. :(

permalink
report
reply
8 points

HTML tends to absorb all its best kludges. I put off learning JQuery for so long that the features I wanted became standard.

permalink
report
reply
7 points

I still reach for sass for a lot of things, but now you don’t have to, which is really nice

permalink
report
reply

Programming

!programming@programming.dev

Create post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Community stats

  • 3.4K

    Monthly active users

  • 2.2K

    Posts

  • 34K

    Comments