Re: Pardon about CSS4 "element()"

[please don't top-post https://wiki.csswg.org/tools/www-style]

On Wed, Dec 16, 2015 at 10:47 AM, Alexey Solovey <acterhd@gmail.com> wrote:
> paint() is paint,  source() and element() are sources for painting API.

I think you're slightly confused about what the various features do:

* element() lets you make an image that looks like an existing element
on the page.
* paint() lets you use JS to produce an image that CSS can use, and
hooks into CSS sizing in a useful way - you can tell what size the
background-image is going to be, for example.

Right now the element() spec also defines a mechanism *similar* to
paint(), where you can create a <canvas> in JS, assign it to the
elementMap, and reference it with element().  This is just a
less-useful version of what paint() does - it doesn't let you respond
to the size that CSS wants to paint the image, for example.  paint()
is *strictly better* than this usage of element(), and there is no
reason to prefer element() for this use-case.  I will remove this
functionality from the Images 4 spec as soon as I have the time to do
so.

~TJ

Received on Wednesday, 16 December 2015 19:26:13 UTC