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.
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!
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
Posts must be relevant to programming, programmers, or computer science.
No NSFW content.
Jokes must be in good taste. No hate speech, bigotry, etc.
z-index: 999999 !important;
!didistutter?;
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.
I support this. Assert dominance.
!importanter;
fun fact:
!important !important
is essentially!importanter
, and you can go even further if you want a hell of a css hierarchyThis… exists? This is horrible.
You can also just write your class again as some sort of additional specificity like
.myclass.myclass.myclass { color:red !important !important; }
this and the parent comment have blown my mind.
The fact that this and the prior comments work don’t make like CSS more tbh
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!
When I read that, I can never not say “not important” in my head
Same
Yeah I think that makes CSS a manager. It’s always prioritizing not important things