W3C home > Mailing lists > Public > www-style@w3.org > October 1996

Re: ! important - for rule or property?

From: Bert Bos <bbos@mygale.inria.fr>
Date: Tue, 15 Oct 1996 15:37:08 +0200 (MET DST)
Message-Id: <199610151337.PAA10632@mygale.inria.fr>
To: "Galarneau, Neil" <ngalarneau@concord6.powersoft.com>
Cc: "'www-style'" <www-style@w3.org>
Neil Galarneau writes:
 > 
 > The document says that ! important applies to the rule, but the grammar   
 > allows
 > ! important after each attribute.
 > 
 > Is the grammar just being very flexible, or is ! important to be   
 > associated with
 > a property not the whole rule?

The use of the word `rule' in section 3.1 may be confusing, though it is
not incorrect. How about changing it to `declaration'?

Remember that in the style sheet

    H1, H2 { color: yellow;
             background: blue !important }

there are two declarations, but *four* rules:

    H1 { color: yellow }
    H1 { background: blue !important }
    H2 { color: yellow }
    H2 { background: blue !important }

The !important applies to the second declaration only, and thereby to
two of the rules.

(The use of `rule' and `declaration' in the grammar of appendix B
doesn't correspond exactly to the usage in the main text. The appendix
is not `normative', as they say.)



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/pub/WWW/People/Bos/                      INRIA/W3C
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 93 65 77 71                 06902 Sophia Antipolis Cedex, France
Received on Tuesday, 15 October 1996 09:37:27 GMT

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