Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

CSS is a declarative language, not an imperative language, so there is no concept of a breakpoint in CSS, because there is no concept of one thing occurring before another. There is a chain of inheritance of course, but Firebug will show you that.

A web browser + Firebug/Web Inspector is effectively a giant REPL, what more could you want?



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.


The 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.


There 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!


That's inheritance.


No, 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: