Re: [css3-images] The image fallback syntax + new image types

2009/6/10 fantasai <fantasai.lists@inkedblade.net>:
> Giovanni Campagna wrote:
>>
>> This draft has appeared late yesterday on the public cvs server and I
>> took a quick glance at it.
>
> Heh, I was hoping to finish the minutes before announcing that so people
> would have some context for why it exists. :) Also to make sure the WG
> wants it to exist, since it was only an informal agreement to define this.

Well, somewhere you have to define new <image> types, either now or in
CSS4, either there or in the Values and Units module, so probably you
would want it to exist.

>> A few rapid comments:
>>
>> - Is <image> intended to reference only images (ie, anything you could
>> put inside an <img>) or any kind of replaced content (ie anything you
>> could put inside an <embed>)?
>> More specifically, will "content" be extend with the <image> syntax?
>
> It is intended only for 2D images.

Why this limitation? And what is the definition of 2D images? SVG
representing 3D scenes using 2D shapes are considered 2D? And SVG with
3D transforms?
Images must be static? Animated GIFs, animated SVGs or videos are
considered <image>s?

And more, how the the implementation discriminates url() refencing
images in classical sense or any kind of replaced content, before
actually referencing the URI, which happens after finding the Computed
Value, at which time you cannot drop invalid properties?

>> - Why did you introduce the <url-token> type?
>> Wasn't it easier to use <string> | <url>, or just <url>? I guess
>> <url-token> will create a lot of tokenization problems, that we should
>> avoid in general, without introducing real benefits (you just skip
>> "url(" and ")" )
>
> The benefit is not having to quote everything. I put it in to see
> what implementors think; if it's not a problem for them, then I
> propose keeping it.

I don't agree with you. Quotes have a well defined purpose and it is
not that more difficult or less performant to write " before and after
the url-token.

>> - Why the last part of image is preceded by a keyword?
>
> To avoid parsing it as a url-token.

This is a good argument in favour of dropping url-token.

>> In addition, I propose to add support for one color images. This would
>> be especially useful in background, if you can stack multiple
>> partially transparent colours, with some covering only the content,
>> some the padding area and some the whole border box. Also, now that
>> border-images can be wider than the box, using colour images is useful
>> to avoid hacks with common borders and negative margins.
>
> I don't understand the use case.

Basically, one may want to add different background colors to the
content box, to the padding box and to the border box. This can be
achieved using various background layers with corresponding background
clip/origin, but you need an image per box. If you want only pure
colors, using a color-image() syntax may be more performant.

>> Lastly, I propose to specify gradients, that WebKit currently
>> supports, or as an alternative, to provide references to SVG paint
>> servers.
>
> The WG has not discussed or agreed to add gradients yet, so it's
> not in the draft. It would fit in this module, however.

I hope that the WG will discuss it, either now or when discussing CSS
Image Values Level 4.

> ~fantasai
>

Giovanni

Received on Thursday, 11 June 2009 12:26:15 UTC