Questions tagged [css-cascade]

CSS Cascade defines which value should be assigned to each property of each element.

CSS Cascade defines which value should be assigned to each property of each element.

The final value is given by a multi-step calculation:

  1. All the declared values applied to an element are collected, for each property on each element.
  2. Cascading yields the cascaded value.
  3. Defaulting yields the specified value.
  4. Resolving value dependencies yields the computed value.
  5. Formatting the document yields the used value.
  6. The used value is transformed to the actual value based on constraints of the display environment.

[Source: CSS Cascade - Value Processing]

W3C specifications

45 questions
111
votes
9 answers

What is the meaning of "cascading" in CSS?

What's the exact meaning of the term "Cascading" in Cascading Style Sheets (CSS)? I am getting different views, so I ask here. An example would help.
Wondering
  • 4,950
  • 22
  • 71
  • 90
10
votes
2 answers

Overriding CSS properties that don't have default values

Is it possible in CSS to override a property if that property doesn't have a default value? For example, say your primary stylesheet defines a border for a particular element: #element { border: 1px solid #000; } If you wanted to disable the…
daGUY
  • 27,055
  • 29
  • 75
  • 119
9
votes
1 answer

Different levels of CSS and the priority over each other

I was reading a decent article here on this topic: http://www.plus2net.com/html_tutorial/css-types.php It came out highest ranked by Google for the search term css style sheets priorities. However I think the site misinforms you and is incomplete!…
JGFMK
  • 8,425
  • 4
  • 58
  • 92
9
votes
7 answers

More important than !important (a higher level !important)?

The title says most of it. Is there a CSS keyword which overrides !important at one higher level or is there some feature like this planned in any newer CSS spec? Of course, I know that !important is a bit likely to be used by noobs and that in many…
Blackbam
  • 17,496
  • 26
  • 97
  • 150
6
votes
3 answers

Overriding CSS property all: unset

For a CSS framework I am developing, I am using all: unset, which by itself works fine: #foo { all: unset; } However, in certain cases, I want to "undo" the effect of this rule, as in #foo:hover { all: auto; } However, this obviously does not work…
user663031
6
votes
1 answer

Injected link stylesheet takes precedence over existing styles in IE7+

There seems to be a bug in IE when cascading dynamic stylesheets. Does anyone know if there is a workaround? Consider this:
test