W3C home > Mailing lists > Public > www-style@w3.org > January 2008

Re: flowing around both sides of a float

From: Philip TAYLOR <Philip-and-LeKhanh@Royal-Tunbridge-Wells.Org>
Date: Thu, 03 Jan 2008 15:55:30 +0000
Message-ID: <477D0572.2080803@Royal-Tunbridge-Wells.Org>
To: Brad Kemper <brkemper@comcast.net>
CC: CSS <www-style@w3.org>



Brad Kemper wrote:

>> How can CSS "style the page in a predictable way"
>> when the effects of the cascade are unpredictable
>> to the page author ?
>>
>> Philip TAYLOR
> 
> Huh?

OK, let me try to express this more clearly.

Suppose that you, as page author, wish to style <H1>s
left-justified in red; when the page is viewed through
a user agent, an "!Important" rule in the users's style
sheet will take precedence over yours, as
per

	http://www.w3.org/TR/REC-CSS2/cascade.html

> 6.4.1 Cascading order
> 
> To find the value for an element/property combination, 
 > user agents must apply the following sorting order:
> 
>    1. [snip, not relevant]
>    2. The primary sort of the declarations is by weight 
 >	and origin: for normal declarations, author style
 >	sheets override user style sheets which override
 >	the default style sheet. For "!important" declarations,
 >	user style sheets override author style sheets which
 >	override the default style sheet. "!important"
 >	declaration override normal declarations.

Thus if the user specifies that he (or she) wants
<H1>s to be centred and in green, his (or her) choice
will take precendence if he (she) makes that rule
"!Important".

In other words, when you (as page author) attempt
to style a document, you can have no /a priori/
knowledge of the environment in which it will
be viewed, and thus no /a priori/ knowledge as
to which of your style rules will be honoured
and which ignored/over-ruled.

Philip TAYLOR
Received on Thursday, 3 January 2008 15:55:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:57 GMT