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

[shapes] new shape-outside keyword for image data

From: Edward O'Connor <eoconnor@apple.com>
Date: Tue, 13 May 2014 10:38:20 -0700
To: www-style@w3.org
Message-id: <m2ppjha8ab.fsf@eoconnor.apple.com>
Hi,

One of the most common cases for shape-outside is to shape an <img>
based on the alpha channel of its image. To accomplish this, authors do
the following:

<img src=foo.png alt="Something meaningful">

img {
  shape-outside: attr(src url);
}

This construction is pretty awkward. It seems to me like we've optimized
for the case where the <img>'s image is different from the image to be
used for shaping. We should have a keyword that captures the more common
case:

<img src=foo.png alt="Something meaningful">

img {
  shape-outside: bikeshed;
}

Another advantage of using a new keyword here is that not all images
have a corresponding URL that we can reference. For example:

<canvas></canvas>

canvas {
  shape-outside: bikeshed;
}


Ted
Received on Tuesday, 13 May 2014 17:37:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:27 UTC