←back to thread

197 points OuterVale | 1 comments | | HN request time: 0.802s | source
Show context
groby_b ◴[] No.46227954[source]
It is extremely funny to me that the list thinks the mistake about !important was using the exclamation mark sigil, and not the concept of a single priority level.

In the words of one of my CS profs, from a few decades ago: "There are only 3 numbers - zero, one, and infinity. And 'one' is often a mistake"

replies(3): >>46228440 #>>46230777 #>>46232341 #
1. dnpls ◴[] No.46232341[source]
There is no need for more priority levels, because precedence is already defined by inline > #ID > .class / [attribute=""] / :pseudo-classes / elements / ::pseudo-element / universal selector (*). And the order they're written, if both have the same priority. The !important just exists to override that order.