W3C home > Mailing lists > Public > www-style@w3.org > March 2011

RE: Possible text-shadow enhancements

From: Brian Manthos <brianman@microsoft.com>
Date: Wed, 2 Mar 2011 03:59:37 +0000
To: Brad Kemper <brad.kemper@gmail.com>, Simon Fraser <smfr@me.com>
CC: Jordan OSETE <jordan.osete@gmail.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <FA122FEC823D524CB516E4E0374D9DCF16D2E906@TK5EX14MBXC138.redmond.corp.microsoft.com>
Some example renderings with specific fonts -- especially serif vs. sans serif fonts -- would be great to help visualize.

-Brian

-----Original Message-----
From: Brad Kemper [mailto:brad.kemper@gmail.com] 
Sent: Tuesday, March 01, 2011 7:56 PM
To: Simon Fraser
Cc: Brian Manthos; Jordan OSETE; www-style@w3.org
Subject: Re: Possible text-shadow enhancements


On Mar 1, 2011, at 5:36 PM, Simon Fraser wrote:

>> http://dev.w3.org/csswg/css3-text/
>> http://www.w3.org/TR/css3-text/#text-shadow
>> 
>> These two drafts agree: "<shadow> is the same as defined for the 'box-shadow' property except that the 'inset' keyword is not allowed."
>> 
>> Simon, are you suggesting that the current text-shadow spec should be reconsidered *or* that text-outline should stay alive because of the distinction? (Or both?)
> 
> I think spread is problematic (if convenient) in the context of box-shadow, and, although I see the benefit of keeping text-shadow and box-shadow similar, I question the utility of spread for text-shadow.

I would say that spread is considerably more important on text than on rects. Text is full of thin strokes of 1 or 2 pixels (until you get to larger font sizes). If you do a couple or more pixels of blur, you lose the shape. With spread, you can beef it up a little bit so that the letter is still letter shaped after the blur. You don't have to completely lose the shape in order to get the shadow to stick out far enough to be noticable.

> I also have no idea how to implement spread on non-rounded-rect shapes, and whether it's possible in a way that has the same behavior as box-shadow's spread in terms of corner rounding.

The way it is defined for box-shadow is pretty box-specific, in terms of defining "cheats" that work for those shapes. For other shapes, you would either have to do a true vector stroke (see how Adobe Illustrator does path stroking, for instance, with limits on how pointy a corner can get), or live with the rounding. I feel rounding of the corners of the text shadow is not that bad, if that is what is required to get spread. It is not that noticeable if the effect is being used to simulate a drop shadow. If you are using it to get a thick outline, then that doesn't work as well.

> So my preference would be to drop spread everywhere, but it's probably too late for that for box-shadow.
> 
> I don't like text-outline, because it's doing blurring but doesn't have 'shadow' in the name.

It doesn't do corners either. With text-shadow and spread, it isn't needed (especially if we can add a fill, the way Jordan suggested). With sharp corners, it would be even better to take over text-outline, but that's secondary in my view.
Received on Wednesday, 2 March 2011 04:00:20 GMT

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