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

It took me a long time to understand this article because I don't think the definition of "cascade" is what we typically use. When I say "cascade", I think of inherited properties and the CSS values falling through the DOM nodes (properties like font-family). The author, however, is simply referring to multiple CSS declarations that match a single DOM node.

  div {
    margin-left: 10px;
    margin-right: 10px;
  }

  .my-widget {
    margin-left: 0;
  }
The author refers to margin-right "cascading" into my-widget. I don't think that's what "cascade" means, but it certainly made CSS harder to work with before tools like Firebug showed you exactly where each property comes from.


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

Search: