Re: Porting fill/stroke (and -opacity variants) to plain CSS

On Wed, Jan 23, 2013 at 1:01 PM, Dirk Schulze <dschulze@adobe.com> wrote:
> On Jan 23, 2013, at 11:15 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> Heya SVGWG, in today's CSSWG call fantasai suggested, to solve another
>> issue, porting SVG's fill and stroke properties to plain CSS, with
>> them applying only to text.
>
> I assume you mean that they apply to HTML as well here. They are CSS already :)

No, I meant what I said - pulling them into "plain" CSS, rather than
SVG-specific CSS.  Plain CSS applies to a lot more than HTML.


>> We'll look to existing SVG application of fill/stroke to <text>, and
>> WebKit's use of their proprietary text-stroke and text-fill
>> properties, to inform how they work.  We'll probably define them in
>> the Text Decoration module.
>>
>> Any issues you anticipate with that?
>
> As discussed on IRC, making 'fill' and 'stroke' applicable to HTML might require (or not) a change to the initial value of 'fill' to 'none'. The UA style sheet would need to set the 'fill' property to 'black' for SVG elements. This is because the 'color' property sets the fill operation for text on HTML (A value of 'auto' was discussed as well, but seems unnecessary to me.)

Changing fill's initial value, and using a UA stylesheet to set
'black' for SVG elements, might work.  Another possibility is an
"auto" value, as you suggest, which computes to "black" on SVG
elements and "currentColor" everywhere else.


> The CSS Decoration spec should probably link to the property definitions on SVG2 (since they do a lot more then filling and stroking text there) and define how they work on text (SVG and HMTL).

Yes, probably a good idea.


> PS: Ironically a previous version of SVG had the initial value 'none' for fill before, until we changed it for SVG1.1SE to follow implementations IIRC.

Heh, great.

~TJ

Received on Wednesday, 23 January 2013 21:13:13 UTC