Re: [css3-images] Generalize the notion of 'invalid images' for image() fallback

On Wed, Mar 7, 2012 at 2:19 PM, Bert Bos <bert@w3.org> wrote:
> On Mar 7, 2012, at 22:04, Tab Atkins Jr. wrote:
>> On Wed, Mar 7, 2012 at 10:58 AM, Bert Bos <bert@w3.org> wrote:
>>> On Tuesday 28 February 2012 02:22:12 Tab Atkins Jr. wrote:
>>>> With an explicit hook, other sources of <image> could potentially
>>>> hook into this as well, though I'm not currently aware of anything
>>>> else that would want to.
>>>
>>> You mean like linear-gradient() and radial-gradient()? Why wouldn't they
>>> make sense inside image()?
>>
>> Because they can't "fail" like a url or element() can.  As long as you
>> don't make a syntax error, a gradient will *always* produce an image.
>
> But a solid color cannot fail either, and yet it is allowed inside image().

Oh, yeah.  It's a fallback, only allowed as the last entry, precisely
because it can't ever fail.

fantasai and I talked about allowing other <image> types as fallbacks
originally, but it's a bit more complicated to work with for not much
more benefit.  I'll revisit that in a future level.

~TJ

Received on Wednesday, 7 March 2012 22:33:46 UTC