Re: [css-shapes] Purpose of fill-rule not specified

On 23 July 2015 at 16:38, Alan Stearns <stearns@adobe.com> wrote:
>
> On 7/23/15, 8:17 AM, "Tom Potts" <karaken12@gmail.com> wrote:
>
> >Okay, that makes sense, although I think you need a note to be clear that
> >the shape used in shape-outside is calculated as if nonzero was
specified,
> > otherwise it starts to look inconsistent when you consider the effect of
> >infinitely thin spurs. (See this demo
> ><http://codepen.io/karaken12/pen/bdmbwg?editors=110> to
> > see what I mean.)
>
> I agree the inconsistency is weird. We should probably have the same
> behavior for both cases, and I don’t have a strong preference for either
> behavior. Do you have an argument for one over the other?

I don't have a strong preference either, as long as the expected behaviour
is clear. My (mild) preference is for the fill-rule setting to be
respected, because in future levels a central void might be useful (I'm
thinking about the examples in earlier versions of the spec with text
flowing "through" a float) and if that ever happens we'd either need to
change the spec at that point, or admit inconsistent behaviour. I think the
current behaviour in Chrome with spurs (ignored for basically everything)
fits well with that.

>
> >
> >Was there any particular reason for choosing this behaviour, by the way?
> >As I mentioned, it wasn't what I expected on reading the spec, but I
> >can't find any discussion as to why it works this way.
>
> I don’t see where this ever came up on the list, so it’s likely my fault
> for not forwarding on some implementation discussion.

It'd be interesting to know why, if there's a quick answer, but I don't
think the details matter too much. If it's an implementation detail that's
fine, but if there's a good reason to prefer one or the other it'd be good
to have that reason recorded somewhere.

>
> >
> >
> >
> >Cheers,
> >Tom
> >
> >
> >On 22 July 2015 at 20:58, Alan Stearns <stearns@adobe.com> wrote:
> >
> >On 7/22/15, 7:08 AM, "Tom Potts" <karaken12@gmail.com> wrote:
> >
> >>I've updated the
> >>example <http://codepen.io/karaken12/pen/gpdwKO?editors=110> to actually
> >>use the shape specification and show the browser's behaviour. On Windows
> >>7 Chrome (v43.0.2357.134) it doesn't do what I would expect it to: it
> >>basically ignores the fill-rule setting.
> >
> >That’s intended. The polygon in Case 3 has an internal void, but the
> >contours still include all of the right edge. Fill-rule doesn’t have any
> >effect on shape-outside. It’s included for shape-inside and clip-path,
> >where internal voids are relevant. I could add a note to the draft
> >mentioning this.
> >
> >Thanks,
> >
> >Alan
> >
> >>
> >>
> >>Thanks,
> >>Tom
> >>
> >>
> >>On 21 July 2015 at 12:00, Tom Potts <karaken12@gmail.com> wrote:
> >>
> >>Reading the spec I couldn't see what the consequence of specifying a
> >>fill-rule would be. For example, what is the expected behaviour of a
> >>left-float with a declaration of
> >>
> >>shape-outside: polygon(0px 150px,100px 150px,100px 50px,50px 50px,50px
> >>100px,100px 100px,100px 0px,0px 0px);
> >>
> >>
> >>
> >>with fill-rules of nonzero or evenodd? (See SVG of this here:
> >>http://codepen.io/karaken12/pen/gpdwKO?editors=100
> >><http://codepen.io/karaken12/pen/gpdwKO?editors=100>)
> >>
> >>
> >>I would expect Case 3 to behave the same as Case 1, but I don't think
> >>this is specified. If I've misunderstood and this is already defined
then
> >>perhaps it could be called out as an example?
> >>
> >>
> >>Cheers,
> >>Tom
>

Received on Thursday, 23 July 2015 18:55:21 UTC