W3C home > Mailing lists > Public > www-style@w3.org > April 2012

[css4-values] Global Keywords 'normal', 'auto', 'none', 'default'

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Tue, 3 Apr 2012 12:54:53 +0200
Message-Id: <03D32407-02EB-43D1-A491-8A76B32782EA@crissov.de>
To: www-style CSS <www-style@w3.org>
I actually thought about something like this (with different keywords) as an April Fool’s joke, but maybe it isn’t that stupid at all. Since the deadline for LC comments for Units and Values Level 3 ended last week, this is a suggestion for Level 4 of that module, although the editors and the WG could of course accept it – at least the first three quarters – into the current draft.

I would like to propose to make the frequent keywords ‘normal’, ‘auto’ and ‘none’ available globally, i.e. for all property values. Modules may give them special meaning per property and begin doing so at any level, otherwise they default to their Values definition and are interpreted as follows:

  ‘normal’:
     The value the user agent vendor prefers for a property in general.
     Usually the same as ‘initial’ or “100%”.

  ‘auto’:
     Any valid value the user agent deems appropriate for the current
     document and rendering environment.
     Usually the same as ‘inherit’ for inherited properties and the 
     same as ‘normal’ for others.

  ‘none’:
     If the property has only two valid values except for global keywords,
     ‘none’ has the opposite effect of ‘normal’.
     If a single numeric value, e.g. <length>, is possible, it equals “0”.
     Otherwise it may be any value at the vendor’s discretion, but should 
     not compute to the same as ‘initial’.

I would also like to propose a new global value, ‘default’:

  ‘default’:
     The value the user agent normally uses for this selector in the 
     current document and rendering environment, often the same as 
     ‘initial’ or ‘inherit’.
     That is, the value from non-important UA and user stylesheets 
     combined, without author stylesheets intervening. 
     If specified in UA stylesheets it works the same as ‘initial’.

All of these can be used wherever ‘initial’ and ‘inherit’ would be valid. Therefore they’re introduced in the same section.

I’m open to better suggestions for the generalized semantics of these keywords.
Received on Tuesday, 3 April 2012 10:55:14 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:52 GMT