[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mozilla 0.9.5, font sizes

on Tue, Oct 16, 2001 at 11:52:52PM -0400, Alan Shutko (ats@acm.org) wrote:
> "Karsten M. Self" <kmself@ix.netcom.com> writes:
> > To this extent, the CSS spec is severely flawed in that it grants
> > precedence to website author, not reader.  This is bass ackwards.
> One major point of CSS was explicitly to grant precedence to reader to
> override things.  It's browser vendors/authors who have been unable to
> grasp this concept, and come up with a decent UI.


I was wrong on this.  My prior reading was that author overrides user,
_including_ in use of the "!important" attribute.  I see this isn't the
case.  As this is a change from CSS1 I may have been confused by prior
references or different sources.

This is a much better situation than I'd feared.  Spec follows.


    Cascading Style Sheets, level 2                         
    CSS2 Specification                                
    W3C Recommendation 12-May-1998

    6 Assigning property values, Cascading, and Inheritance


    6.4.1 Cascading order

    To find the value for an element/property combination, user agents
    must apply the following sorting order:


     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. An imported style
	sheet has the same origin as the style sheet that imported it.

    Apart from the "!important" setting on individual declarations, this
    strategy gives author's style sheets higher weight than those of the
    reader. It is therefore important that the user agent give the user
    the ability to turn off the influence of a certain style sheet,
    e.g., through a pull-down menu.

    6.4.2 !important rules
    CSS attempts to create a balance of power between author and user
    style sheets.  By default, rules in an author's style sheet override
    those in a user's style sheet (see cascade rule 3).

    However, for balance, an "!important" declaration (the keywords "!"
    and "important" follow the declaration) takes precedence over a
    normal declaration.  Both author and user style sheets may contain
    "!important" declarations, and user "!important" rules override
    author "!important" rules. This CSS feature improves accessibility
    of documents by giving users with special requirements (large fonts,
    color combinations, etc.) control over presentation.

    *Note. This is a semantic change since CSS1. In CSS1, author
    "!important" rules took precedence over user "!important" rules.*

    [Emphasis in original]


Karsten M. Self <kmself@ix.netcom.com>       http://kmself.home.netcom.com/
 What part of "Gestalt" don't you understand?             Home of the brave
  http://gestalt-system.sourceforge.net/                   Land of the free
   Free Dmitry! Boycott Adobe! Repeal the DMCA! http://www.freesklyarov.org
Geek for Hire                     http://kmself.home.netcom.com/resume.html

Attachment: pgpQSkeCeTU1V.pgp
Description: PGP signature

Reply to: