W3C home > Mailing lists > Public > www-style@w3.org > December 2015

Re: Pardon about CSS4 "element()"

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 16 Dec 2015 11:25:26 -0800
Message-ID: <CAAWBYDAtpY5tbrUse1+QG_+iyTM7c7ysDaNEE_7RU0X7WZawJw@mail.gmail.com>
To: Alexey Solovey <acterhd@gmail.com>
Cc: www-style list <www-style@w3.org>
[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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:59 UTC