this post was submitted on 23 Oct 2025
95 points (97.0% liked)

Web Development

4704 readers
126 users here now

Welcome to the web development community! This is a place to post, discuss, get help about, etc. anything related to web development

What is web development?

Web development is the process of creating websites or web applications

Rules/Guidelines

Related Communities

Wormhole

Some webdev blogsNot sure what to post in here? Want some web development related things to read?

Heres a couple blogs that have web development related content

CreditsIcon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
 

After years of developer frustration and questions on online forums, it’s finally happening: CSS is getting an if() function to apply styling when a condition is met. For the first time, developers can make logical decisions directly in stylesheets, without separate code blocks. This opens up whole new possibilities for web designers.

top 17 comments
sorted by: hot top controversial new old
[–] phneutral@feddit.org 4 points 9 hours ago

This breaks with the foundations of CSS. You already can build if-like statements especially since the implementation of custom properties. It doesn’t have to be that explicit — quite the contrary: putting if() into every property will make them bloated and harder to understand.

[–] monogram@feddit.nl 3 points 8 hours ago

Since flexbox I haven’t seen any useful updates to css.

This just gatekeeps alternative browsers from taking part.

[–] trolololol@lemmy.world 13 points 12 hours ago

What an abomination

I'm just curious what kind of bad code is going to be around when this gets widespread.

[–] fubarx@lemmy.world 6 points 11 hours ago

Slow-walk to plain scripting.

[–] fox2263@lemmy.world 7 points 17 hours ago (1 children)

It should be like CSS5 by now with all the stuff they’ve added

[–] phneutral@feddit.org 1 points 9 hours ago

After CSS3 they switched to rolling releases and dropped any numbers, AFAIK.

[–] mormund@feddit.org 15 points 22 hours ago

Only in Chromium for now. Also I don't see how it adds any new capabilities? I guess it is a little nicer syntax wise in some cases, but I might still prefer SCSS nested declarations instead.

[–] SatyrSack@quokk.au 7 points 19 hours ago (2 children)

When was the last time a feature this huge was added to CSS?

[–] 0xDREADBEEF@programming.dev 11 points 14 hours ago* (last edited 14 hours ago)

CSS Nesting

.foo {
    .nested {
        property: value;
    }
}

@container and @scope were pretty big in my opinion.

[–] sik0fewl@lemmy.ca 3 points 18 hours ago

JSSS had this 30 years ago!

[–] MadMadBunny@lemmy.ca 5 points 23 hours ago

O.M.G. Finally!!!!

[–] 30p87@feddit.org 2 points 21 hours ago (1 children)
[–] 30p87@feddit.org 1 points 21 hours ago* (last edited 18 hours ago) (2 children)

When <if cond="true"></if> and <set var="x" val="lol">?

[–] 4am@lemmy.zip 4 points 11 hours ago (1 children)
[–] 30p87@feddit.org 2 points 9 hours ago

Yeah, that's the point... CSS has conditionals now, so when will we get HTML conditionals and variables?

[–] TeamAssimilation@infosec.pub 10 points 18 hours ago

Can’t wait to have business logic in my CSS!