this post was submitted on 11 Aug 2023
497 points (97.0% liked)

Programmer Humor

32557 readers
728 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] odium 80 points 1 year ago (4 children)

z-index: 999999 !important;

[–] [email protected] 44 points 1 year ago

!didistutter?;

[–] [email protected] 29 points 1 year ago (1 children)
[–] [email protected] 36 points 1 year ago (2 children)

fun fact: !important !important is essentially !importanter, and you can go even further if you want a hell of a css hierarchy

[–] [email protected] 14 points 1 year ago (3 children)

You can also just write your class again as some sort of additional specificity like

.myclass.myclass.myclass { color:red !important !important; }

[–] [email protected] 6 points 1 year ago (1 children)

The fact that this and the prior comments work don't make like CSS more tbh

[–] [email protected] 2 points 1 year ago

Like most things in the world of dev, there are right and wrong ways to do things. Just because you can doesn't mean you should! CSS can be quite nice when used correctly!

[–] [email protected] 1 points 1 year ago

this and the parent comment have blown my mind.

[–] [email protected] 2 points 1 year ago

This... exists? This is horrible.

[–] [email protected] 17 points 1 year ago (1 children)

I actually encountered an issue earlier today where my important wasn't working...and it was because another dev had already added a more specific important.

I deleted their important.

[–] [email protected] 8 points 1 year ago

I support this. Assert dominance.

[–] [email protected] 2 points 1 year ago (2 children)

When I read that, I can never not say “not important” in my head

[–] hellishharlot 3 points 1 year ago

Yeah I think that makes CSS a manager. It's always prioritizing not important things

[–] odium 2 points 1 year ago