On Tue, Dec 14, 2010 at 7:58 PM, Tim Climis <[email protected]> wrote:
> No they don't.  Take your style attribute out.  Now move it to an
> external style sheet.
>
> Put the link to the style sheet before the style tags, and your text will
> be green. So far, things are doing what you expect...
>
> But now, put the link to the style sheet AFTER the style tags.  The text
> is now red.
>
> As Jukka said, style tags and external sheets have the same level in
> the cascade order, so it only matters which order they're in -- not
> what file.
>
> ---Tim

To clarify this in my own head I have divided "cascade" into two parts:

     1) Assembly of a virtual consolidated style sheet
     2) Calculating selector's specificity

I know the real situation is a bit more complex. But this has helped
me to keep the various parts of the process somewhat understandable.

The question of external style sheet reference before or after
internal style relates to assembly of the consolidated style sheet.

I have found in every test I've made that a subsequent definition with
the exact same specificity will over-write a previous one. The only
exceptions to this resulting from the use of !important. Which is the
expected behavior.

I don't have the link (sorry) but there was a very interesting article
written a while back detailing the race conditions that can happen
with various combinations of @include and link. (I bet the author is
on this list somewhere.) Again all of this contributes to the assembly
process.

Once the consolidated style sheet has been assembled then issues of
selector specificity will come into play. Others know the area of
selector specificity better than I could ever hope to.

The only piece of the puzzle I would proffer to the list is possible
clarity to the discussion if we divide it into the 1) accumulation
into a single consolidated style sheet and 2) resolution of precedence
and priorities of various selectors.

Regards,
Claude
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to