What is the cascading module used for? Why it’s called “cascade”?

“Cascading” in this context means that because more than one stylesheet declaration could apply to a particular piece of HTML, there has to be a known way of determining which specific stylesheet rule applies to which piece of HTML.

The rule used is chosen by cascading down from the more general declarations to the specific rule required. The most specific declaration is chosen.

Read the official W3C specification on cascading here: https://www.w3.org/TR/css-cascade-4/

Leave a Comment