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

Re: [css21][css3-cascade] Proposal for value assignment to shorthand properties

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Wed, 11 Jan 2012 20:53:59 +0100
To: Anton Prowse <prowse@moonhenge.net>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <ccprg7tm83vs839qi12cld76sfp2ri1ajb@hive.bjoern.hoehrmann.de>
* Anton Prowse wrote:
>Interesting.  So 'font' went from being an active shorthand to a passive 
>one.  In my proposal, I think that would be forbidden.  (This particular 
>example isn't a practical problem, though, since several UAs don't treat 
>any shorthands as active at the moment so we can just treat 'font' as if 
>it were always a passive shorthand.
>Are you aware of any other examples like this?

Well `border` resets `border-image`, but you will have to create a list
on your own.

>> A shorthand set to either of the values results in setting all the sub-
>> properties to the same value plus whatever else is required, like re-
>> setting certain other properties. This should be clear from the syntax
>> of the shorthand properties, where `inherit` is only allowed as alter-
>> native for everything else (and the references to longhands do not in-
>> clude `inherit` as explained in the definition of the notation), but in
>> CSS 2.1 C.3.1 this is more explicit.
>Indeed; I don't think I contradicted that, although I did query in a 
>recent thread[1] with Tab what the exact reasons were for this 
>all-or-nothing approach but it hasn't yet received a response.  (I 
>suspect the answer will turn out to be rather influential to any 
>proposal for fixing shorthands.)  Also, the "whatever else is required" 
>is interesting.  By "resetting certain other properties" I guess you're 
>referring to 'font-stretch' in your 'font' example above.  Did you have 
>any other cases in mind?

I am not sure which rationale you are looking for. As for the latter,
the point is that the CSS Working Group has not made any promises on
how future shorthand properties will be defined, and the CSS Working
Group isn't good at keeping promises where it does make them, see the
ever-changing never-changing core syntax, so any "model" for short-
hand properties would have to be open-ended, or it would have to be
made clear that the "model" introduces constraints for future short-
hands. Currently I am not aware of side-effects beyond those mentioned.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Wednesday, 11 January 2012 19:54:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:09 UTC