4 ms·
The order of evaluation matters. If the browser finds 2 declarations that are in conflict, then only the last one is taken into account. And that's not inherita
by bad_user 15y ago
The order of evaluation matters. If the browser finds 2 declarations that are in conflict, then only the last one is taken into account. And that's not inheritance.
- sahillavingia 15y agoThere is more to it than just that. For example you can have a class and an id for a div. The id attributes will overwrite the class ones. And some other fun rules too!
- jahewson 15y agoThat's inheritance.
- Dinoguy1000 15y agoNo, that's specificity (an entirely different beast, and one that can be considerably harder to work with). Inheritance would be styles for a P tag applying to a child I tag.
- jahewson 15y agoThe order in which declarations are written does indeed matter, but that's not the same as evaluation. If I assign some color attribute to black, then red, then black, the color in the DOM will never actually be red, so itsnstill meaningless to talk about a breakpoint.