W3C home > Mailing lists > Public > www-style@w3.org > November 2010

RE: Specifying partial property values (was: Re: [css3-background] New use case for background-position-x (&y!))

From: Brian Manthos <brianman@microsoft.com>
Date: Fri, 12 Nov 2010 19:26:48 +0000
To: Jonas Hartmann <j0n4s.h4rtm4nn@googlemail.com>, Lee Kowalkowski <lee.kowalkowski@googlemail.com>, Brad Kemper <brad.kemper@gmail.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <FA122FEC823D524CB516E4E0374D9DCF16995762@TK5EX14MBXC140.redmond.corp.microsoft.com>
Background-position isn't a shorthand.  IE's implementation has ... "some depth" ... w/r/t treating background-position somewhat like a shorthand for legacy compatibility reasons.  That was by no means an easy facet of the implementation.


As currently specced, box-shadow isn't a shorthand either.  It's a single property.

While I concur that there is some author value in expanding that design, it's not a trivial undertaking.  'Background' does pave the way a bit, because the complexity of the box-shadow property (layers, multiple fields, etc.) is already present in one form or another.


CSS4 perhaps...

- Brian


> -----Original Message-----
> From: www-style-request@w3.org [mailto:www-style-request@w3.org] On
> Behalf Of Jonas Hartmann
> Sent: Wednesday, November 10, 2010 11:34 AM
> To: Lee Kowalkowski; Brad Kemper; Tab Atkins Jr.; www-style@w3.org
> Subject: Specifying partial property values (was: Re: [css3-background] New
> use case for background-position-x (&y!))
> 
> Hello,
> 
> On 2010-11-09, at 23:51, Lee Kowalkowski wrote:
> ...
> > The main point is there are situations where an author would like to
> > specify -x without -y, for whatever reason, exactly like when
> > specifying margin-top without interfering with margin-left defined in
> > another rule.
> ...
> 
> I wondered how I can change CSS3 text-shadow-color or text-shadow-
> distance-top or text-shadow-distance-left or text-shadow-blur-radius
> 
> http://www.w3.org/TR/css3-text/#text-shadow

> http://www.w3.org/TR/2010/WD-css3-background-20100612/#box-shadow

> 
> Did I miss something or is that not possible? On the argument that you can
> specify multiple light directions => shadows you could still offer
> 
> text-shadow: 3px 2px 1px red, 1px 2px 3px blue;
> text-shadow-color: yellow, rgba(0,0,0,0.4);
> 
> (awesome would even be text-shadow-color: yellow, rgba(cascade, cascade,
> cascade, 0.4);)
> 
> 
> CSS always had very good shorthands as well as full properties like padding
> and margin for instance.
> 
> With the browser vendors pre-standard implementations of background
> gradients I had the issue described above as well, I could not simply change
> parts of the gradient or add a background-color ex-post (for graceful
> degration, e.g. older browsers, lets say in my ie.css). Always having to specify
> a full property where a partial (with magic standard values) would be
> sufficient is bad.
> 
> text-shadow: red; should work as should text-shadow: 1px - or text-shadow:
> 1px 1px, or text-shadow: 1px 1px red - you get the idea and can probably
> imagine what a good default would be.
> 
> 
> King regards
>  Jonas
> 
> p.s.: I took a look at the spec, sorry if I did not get it right and its all in.

Received on Friday, 12 November 2010 19:39:28 GMT

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