Previous Message
Next Message

Re: [css-d] CSS Methodologies

Sent by Jim Gay on 23 July 2003 19:07


> <quote>
> Really? I thought the cascade applied to the order in which the styling is
> applied as opposed to the order it is in within the style sheet (unless
> there are conflicting style sheets or in-line styles defining the same
> element, class or ID). My understanding of the cascading order (
> http://www.w3c.org/TR/CSS1#the-cascade -Rule 4) leads me to believe that
> the acronym element is more specific than the body and thus its style rules
> would take precedence over those set in the body. My experience has shown
> this to be the case for all but :link and its cohorts.
> </quote>
> 
> Well, in http://www.w3.org/TR/REC-CSS1#cascading-order point 5 it says:
> 
> <quote src="http://www.w3.org/TR/REC-CSS1#cascading-order">
> 5. Sort by order specified: if two rules have the same weight, the latter
> specified wins. Rules in imported style sheets are considered to be before
> any rules in the style sheet itself.
> </quote>
> 
> So it might matter, though not always. It surely is better having things
> organized in a way that helps avoiding this problems...

acronym is more specific than body. its the equivalent of:
body { ... }
* acronym { ... }

I have never had a problem with alphabetizing my css, for that reason.

but your main point is correct. if I do:
p {color: red}
p {color: blue}

blue wins because it is the latter specified.

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: