Stacking contexts

Along with transforms being 3d or flat transform styles

z-index: 999999 !important;

@AlecSadler@lemmy.ml
link
fedilink
English
171Y

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.

!didistutter?;

@sbv@sh.itjust.works
link
fedilink
English
291Y

!importanter;

Xylight (Photon dev)
link
fedilink
English
351Y

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

Fedora
link
fedilink
21Y

This… 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; }

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!

this and the parent comment have blown my mind.

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

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

“programmer”

Always forget the position: relative

Hmmm sweetie front-enders are accepted in the committee but we do not grant them speaking privileges

cs127
link
fedilink
46
edit-2
1Y

the z index is so high that the div escaped your monitor and is behind your head now

Create a post

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.
  • 1 user online
  • 120 users / day
  • 257 users / week
  • 744 users / month
  • 3.72K users / 6 months
  • 1 subscriber
  • 1.48K Posts
  • 32.5K Comments
  • Modlog