Settings

Theme

CSS Stuff I'm Excited After the Last Csswg Meeting

css-tricks.com

3 points by graylien a year ago · 1 comment

Reader

lofaszvanitt a year ago

More confusing and borderline idiotic syntax comes for CSS in the form of IF conditionals. CSS is already a syntax hell, an unreadable mess, but the author is excited... oh dear god. The asteroid is coming, He is excited... Really?

Cut the bloat, what is this mongrelified thing?

background-color: if(style(--weather: clouds) ? var(--clouds-color): var(--default-color));

I tell you what it is. it is Holy shit level bullshit!

Okay let's see another example.

Conjured by some alien lifeform:

width: if(media(width > 1200px) ? var(--size-l): var(--size-m));

What about a semblance of sanity:

width: if (media:width > 1200px) ? $size-l: $size-m;

Much more readable isn't it? Strive for something like this please, don't make css look like a Silent Hill monster.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection