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

Re: [css-shapes] new Last Call Working Draft published

From: Alan Stearns <stearns@adobe.com>
Date: Wed, 5 Mar 2014 20:32:52 +0000
To: Håkon Wium Lie <howcome@opera.com>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <CF3CC7F1.3CACD%stearns@adobe.com>
On 3/5/14, 12:20 PM, "Håkon Wium Lie" <howcome@opera.com> wrote:

>Alan Stearns wrote:
> > >
> > >First, by describing the shape of an element in the style sheet,
> > >content and presentation is mixed. If images had been referred to in
> > >the style sheet (like background images are), this would probably have
> > >been ok, but when the elements are HTML elements, CSS should not
> > >describe their shapes.
> > 
> > I don’t quite understand this. CSS describes the displayed shape of
> > elements using tools like border-radius.
>Border-radius can be applied to many types of images. For
>example, photos often came with rounded corners in the old days, and
>one can easily achieve that retro feeling with a line in the style sheet.
>  img { border-radius: 1em }
>But shapes are different, by a magnitude. Take, for example, the blue
>triangle example you use in the draft -- you couldn't take the CSS
>   shape-outside: polygon(50px 0px, 100px 100px, 0px 100px);
>an apply it to other images -- that code is tied to that specific
>image. Used for drop-cap effects, you would have to write different
>style snippets for (almost) all letters in the alphabet. There's very
>little code reuse.

In this case the triangles are not being used for drop caps, and they can
be re-used for any image with the relevant content in the triangular area.
I fairly quickly found many images that would work for that example
without changing the polygons at all, and changed the example to use one
of them.

> > One use case of shape-outside is
> > to use that same shape from CSS to affect wrapping behavior. The basic
> > shape functions give CSS more expressivity on how an element is
> > (with clip-path) and how wrapping occurs. These capabilities seem to
>me to
> > be properly placed in CSS.

In any case, the working group resolved this morning to not change the
draft based on your first point, for the reason just above.

>> >Third, there is a way to refer to a shape in the image itself, as
> > >opposed to writing poloygons in CSS. That's good. However, only the
> > >alpha channel of the image can be used. I believe it is much more
> > >natural for authors to use the visible luminance of the image, and
> > >this option should be added. The current model favors authoring tools.
> > 
> > We’ve discussed this before, and luminance could be added in a future
> > level, along with additional shape mechanisms currently described in
> > shapes level 2 skeleton draft. I would prefer to keep level 1 as small
> > possible so that we can implement and iterate.
>If simplicity is a goal, we should remove reliance on alpha
>channels and only consider luminance.

And the working group also resolved this morning to postpone handling
luminance for shape-outside to the next level of CSS Shapes.



Received on Wednesday, 5 March 2014 20:33:41 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:20 UTC