Hacker News new | ask | show | jobs
by dumbo-octopus 885 days ago
Yes, the specificity/precedence is all determined statically from only the .css files, the class order has nothing to do with it. This is a good thing because it allows for methods like https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenLis... to not need to concern themselves with insert positions.

https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity

> If the competing selectors have the same values in all the three columns, the proximity rule comes into play, wherein the last declared style gets precedence.

1 comments

Sorry, I meant what order does this is linter do it in?

I’m well aware of how css works, I’ve been here since we did table layouts with shims!

The order of the classes in the dom will match the order of the classes in the .css files