#CSSTales

I fear that I'm mis-understanding a fundamental principle of CSS: The cascading bit.

In this image I see that my "display: inline-flex;" rule comes *before* (line 1277) my "display: none;" rule (line 1682). Instinctively I would think that the one that comes at the bottom of the file would take priority, but apparently it does not. Not sure what to think of that to be honest.

Follow

@hecate the display: inline-flex block takes priority because the selector is more specific

only when the selector specificity is the same do later rules get the priority

Sign in to participate in the conversation
Pixietown

Small server part of the pixie.town infrastructure. Registration is closed.