RE: Agenda, 2 February 2012 SVG WG telcon

Hi Tab,

> -----Original Message-----
> From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
> Sent: Friday, 3 February 2012 1:31 AM
> To: Tavmjong Bah
> Cc: Erik Dahlstrom; public-svg-wg@w3.org
> Subject: Re: Agenda, 2 February 2012 SVG WG telcon
>
> On Thu, Feb 2, 2012 at 6:17 AM, Tavmjong Bah <tavmjong@free.fr> wrote:
> > On Wed, 2012-02-01 at 13:30 +0100, Erik Dahlstrom wrote:
> >> * currentColor change in CSS
> >>    http://www.w3.org/mid/4F21EFE8.5020309@mcc.id.au

> >
> > If I understand correctly, we have agreed to add currentFillPaint and
> > currentStrokePaint SVG2 and these along with currentColor would have
> > two sets of values: "on define" and "on use".[1] It's not clear to me
> > how this would be specified in practice. The value "on use" is needed
> > to solve the long standing problem with marker color matching stroke color.
>
> The additional five values are all compatible with the proposed change.
Could you elaborate a bit more?

The SVG WG already agreed to include the following keywords in SVG 2:
currentColor
currentFillPaint
currentStrokePaint
For these, the value of the 'color' (or fill or stroke) property replaces the current* value in the property, where it is specified.

<svg>
<g display="none" color="yellow">
  <rect id="myRect" fill="currentColor"/>
</g>
<g color="red">
  <use xlink:href="#myRect"/>
</g>
</svg>
This would display a yellow rectangle.

useColor
useFillPaint
useStrokePaint
For these, the value of the 'color' (or fill or stroke) property replaces the current* value in the property, where it is used.

<svg>
<g display="none" color="yellow">
  <rect id="myRect" fill="useColor"/>
</g>
<g color="red">
  <use xlink:href="#myRect"/>
</g>
</svg>
This would display a red rectangle.

<svg>
<g display="none" color="yellow">
  <g id="myG" fill="currentColor">
   <rect id="myRect"/>
 </g>
</g>
<g color="red">
  <use xlink:href="#myG"/>
</g>
</svg>
According to the modification you propose, the currentColor keyword is inherited to the rectangle. When the rectangle is used, the currentColor keyword is replaced by the color value (here red). This would produce a red rectangle instead of a yellow, right? In effect, it is similar to the 'useColor' keyword. Why not use the useColor keyword in the first place?

Cyril
The information contained in this email message and any attachments may be confidential and may also be the subject to legal professional privilege. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. If you have received this email in error, please immediately advise the sender by return email and delete the information from your system.

Received on Sunday, 5 February 2012 22:48:40 UTC