CSS-Specifity and CSS Inheritance (concrete question)?
Posted
by jens
on Stack Overflow
See other posts from Stack Overflow
or by jens
Published on 2010-04-16T11:40:46Z
Indexed on
2010/04/16
11:43 UTC
Read the original article
Hit count: 466
css
Hello,
i would by thankful for an official link (and section) of the specification for CSS, that explains if:
.one two h1 {color:green;font-family:arial;} /*case 1 */
.one two h1 {color:blue;} /*case 2*/
will result in (when evaluated by the browser)
.one two h1 {color:blue;font-family:arial;} /*case 3*/
or will it be:
.one two h1 {color:blue;} /*case 4*/
==>I have read a lot about inheritance, specifity, cascading etc but I still have not found for the given example which rules apply here.
In regard to specifity both elements are equal in specifity the case2 will be the most specify one (as it is equal specific but the last one). But does specifity always apply to the whole selector with ALL properties defined. Or only the the properties that are are in "competition" (and declared in both).
thanks!!!!
© Stack Overflow or respective owner