Re: [css3-exclusions] remove <fill-rule> from "polygon()" syntax

I think the concern is that clip-rule is an SVG-specific styling property
[1], not a CSS one.
Moving forward, will SVG continue to have unique styling properties, or is
the goal to incorporate them under the broader CSS heading?

-Bear

[1] http://www.w3.org/TR/SVG/styling.html#SVGStylingProperties

On 8/28/12 8:41 PM, "Dirk Schulze" <dschulze@adobe.com> wrote:

>
>On Aug 28, 2012, at 6:33 PM, Rik Cabanier <cabanier@gmail.com> wrote:
>
>> 
>> 
>> On Tue, Aug 28, 2012 at 5:44 PM, Dirk Schulze <dschulze@adobe.com>
>>wrote:
>> 
>> On Aug 28, 2012, at 5:09 PM, Rik Cabanier <cabanier@gmail.com> wrote:
>> 
>> > In SVG, fill-rule [1] and clip-rule[2] are inherited so they can be
>>set on a <g> element and affect the paths of the children.
>> >
>> > 1: http://www.w3.org/TR/SVG/painting.html#FillProperties
>> > 2: http://www.w3.org/TR/SVG/masking.html#EstablishingANewClippingPath
>> >
>> > On Tue, Aug 28, 2012 at 3:54 PM, Dirk Schulze <dschulze@adobe.com>
>>wrote:
>> >
>> > On Aug 28, 2012, at 3:51 PM, Rik Cabanier <cabanier@gmail.com> wrote:
>> >
>> > > I think fill/clip-rule should stay with the marking operator in CSS.
>> > > It makes much more sense to keep them there than making them part
>>of the graphics state and it will make the implementation much easier.
>> > > (I know this is different from SVG.)
>> > I am not sure what you mean. Can you clarify more please?
>> >
>> > In SVG, fill-rule [1] and clip-rule[2] are inherited so they can be
>>set on a <g> element and affect the paths of the children.
>> >
>> > It would be better if these rules are not inherited and just
>>specified per fill/stroke/clip. Not only would it save you from having
>>to keep them in the state, it would also help if you move paths around
>>since you don't have to remember their inherited winding. I've never
>>seen a case where you want to use the same path with different fill
>>rules.
>> >
>> Like you noted, they are already defined in SVG 1.1.
>> 
>> Also 'inherit' is one of the default keywords that apply to every CSS
>>property and the default value is not 'inherit' but 'nonzero'. Therefore
>>you need to specify the 'fill-rule'/'clip-rule' on the path itself to
>>'inherit'. If you do that, I assume you are aware that it inherits the
>>value from the parent :).
>> 
>>  True, but do you want this in CSS? Have you ever seen someone use this?
>> Better to keep the winding rule with the drawing operator.
>
>I still don't get your point. 'clip-rule' is a CSS property and it is
>specified. What do you mean with "don't bring it to CSS"?
>
>I assume you mean we should not use it on 'polygon()'. We already
>resolved that it still makes sense to have the <fill-rule> on the
>function. I am just asking for the case that the author did not specify
>it on the function directly.
>
>And it doesn't make sense for me that 'clip-rule' (if set by someone)
>does not affect the 'clip-path' property on basic shapes, but does for
>the clipPath element. That are my only concerns. I am not exposing
>something new. If someone does neither set the <fill-rule> by
>'polygon()', nor by 'clip-path' it will be 'nonzero' anyway. The same
>value as if we would not specify it. So why not giving the author the
>choice?
>
>Greetings,
>Dirk
>
>>  
>> >
>> > 1: http://www.w3.org/TR/SVG/painting.html#FillProperties
>> > 2: http://www.w3.org/TR/SVG/masking.html#EstablishingANewClippingPath
>> >
>> > >
>> > > On Tue, Aug 28, 2012 at 3:28 PM, Dirk Schulze <dschulze@adobe.com>
>>wrote:
>> > >
>> > > On Aug 28, 2012, at 1:55 PM, Alan Stearns <stearns@adobe.com> wrote:
>> > >
>> > > > (I hope I fixed the quoting correctly)
>> > > >
>> > > > On 8/28/12 12:17 PM, "Bear Travis" <betravis@adobe.com> wrote:
>> > > >
>> > > >> On 8/28/12 11:29 AM, "Dirk Schulze" <dschulze@adobe.com> wrote:
>> > > >>
>> > > >>> On Aug 28, 2012, at 8:50 AM, Tab Atkins Jr.
>><jackalmage@gmail.com> wrote:
>> > > >>>
>> > > >>>> On Tue, Aug 28, 2012 at 6:45 AM, Dirk Schulze
>><dschulze@adobe.com>
>> > > >>>> wrote:
>> > > >>>>> Hi,
>> > > >>>>> I think the keywords for <fill-rule> should be removed from
>>the syntax
>> > > >>>>> of 'polygon()'[1]. I think the shapes on the exclusion spec
>>can be
>> > > >>>>> reused in other contexts as well. One example is <shape> as
>>shorthand
>> > > >>>>> for 'clip-path' in the CSS Masking[2] spec. But for
>>'clip-path' we
>> > > >>>>> already have the 'clip-rule' property with the values
>>'nonzero' and
>> > > >>>>> 'evenodd' [3].
>> > > >>>>> I would suggest using the 'fill-rule' property from SVG [4]
>>to specify
>> > > >>>>> the fill rule on 'polygon()'. This property is already
>>implemented by
>> > > >>>>> all browsers anyway.
>> > > >>>>
>> > > >>>> I don't see how that works, if shape functions are going to be
>>usable
>> > > >>>> in multiple properties.
>> > > >>>
>> > > >>> We have clip-rule and fill-rule. So where is the problem?
>> > > >>
>> > > >> What would the effect be on CSS Exclusions? [1]
>> > > >>
>> > > >> It seems like the css for specifying a shape-inside [2] would
>>change from
>> > > >> {
>> > > >> shape-inside: polygon(evenOdd, 0 0, 10px 0, 5px 10px 0 0);
>> > > >> }
>> > > >> To
>> > > >> {
>> > > >> shape-inside: polygon(0 0, 10px 0, 5px 10px, 0 0);
>> > > >> fill-rule: evenOdd;
>> > > >> }
>> > > >>
>> > > >> Is this correct?
>> > > >>
>> > > >> -Bear
>> > > >>
>> > > >> [1] http://dev.w3.org/csswg/css3-exclusions/
>> > > >> [2] 
>>http://dev.w3.org/csswg/css3-exclusions/#shape-inside-property
>> > > >
>> > > > Bear,
>> > > >
>> > > >
>> > > > I believe that's what Dirk is asking for. But it sounds to me
>>like it
>> > > > would need to be an additional property per
>> > > > property-that-accepted-shape-syntax (fill-rule, clip-rule - what
>>about
>> > > > shape-inside-rule and shape-outside-rule?). And these new
>>properties would
>> > > > only apply if the polygon syntax was used. I think it might be
>>better kept
>> > > > as a parameter in the polygon function.
>> > > >
>> > > Yes, you might be right.
>> > >
>> > > Basic shapes could be a good fit for 'clip-path'. For 'clip-path'
>>we have the 'clip-rule' property which sets the fill-rule. The keyword
>>for the fill-rule on 'polygon()' is optional but nonzero by default. I
>>would like to use the value of the 'clip-rule' property if no keyword
>>was set on 'polygon()'. Is it possible that CSS Exclusions also let
>>other specifications and properties define the clip rule then? E.g.
>> > >
>> > > clip-rule: evenodd;
>> > > clip-path: polygon(25% 25%, 50% 50%, 75% 25%);
>> > >
>> > > The clip rule would be evenodd for the polygon(), since 'clip-rule'
>>property defines it.
>> > >
>> > > If the rule was set on the polygon(), it overrides any other
>>property that aims to set the fill rule.
>> > >
>> > > Does that sound reasonable for you?
>> > >
>> > > Greetings,
>> > > Dirk
>> > >
>> > > > Thanks,
>> > > >
>> > > > Alan
>> > > >
>> > >
>> > >
>> > >
>> >
>> >
>> 
>> 
>

Received on Thursday, 30 August 2012 00:32:36 UTC