Difference between revisions of "Cascade (CSS)"
Karl Jones (Talk | contribs) |
Karl Jones (Talk | contribs) (→See also) |
||
Line 22: | Line 22: | ||
* [[Cascading Style Sheets]] | * [[Cascading Style Sheets]] | ||
− | * [[Cascade weight (CSS]] | + | * [[Cascade weight (CSS)]] |
== External links == | == External links == | ||
* http://code.karljones.com/docs/css/CSS-part-02.pdf | * http://code.karljones.com/docs/css/CSS-part-02.pdf |
Revision as of 11:55, 8 March 2016
In Cascading Style Sheets, the cascade refers to a set of principles which determine how style rules interact with HTML.
Contents
Basic principles
The Cascade (CSS) refers to the way that CSS deals with multiple style rules, when the rules apply to a single specific HTML element.
When rules do not conflict, they combine
Both rules apply, when they do not conflict with each other.
When rules conflict, highest cascade weight wins
Cascade weight (CSS) is a measure of how important a rule is, among all rules which affect a give web page.
When two or more rules conflict, the rule with the highest Cascade weight (CSS) applies. The other rules are ignored.
It is not necessary to calculate, or know, the numeric value of the weight (although you can look it up using Inspect Element), if you are curious).
More important, you should know the general principles of the cascade. You will be able to judge the weight intuitively, with practice.