W3C home > Mailing lists > Public > www-style@w3.org > April 2004

Re: content: url() is bad

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 14 Apr 2004 23:58:12 -0400
Message-ID: <407E0854.8070201@inkedblade.net>
To: www-style@w3.org

Boris Zbarsky wrote:
> 
> Ian Hickson wrote:
> 
>> How about actually putting it all on one property, like this:
>>
>>    'content'
>>    Values: [ <uri> [ ',' <uri> ]+ '/' ]? [ <content-list> [ ',' 
>> <content-list> ]+ | normal
> 
> 
> So the semantics are "stuff before '/' replaces, stuff after '/' becomes 
> kids"?

I'd go with a pipe instead -- slash very often has higher precedence
than a comma, and reversing it here makes it harder for me to parse.

The syntax doesn't see very obvious to me. If I'm reading the code,
there's no way I'd guess putting something before a slash (or pipe)
gives it replaced-element treatment. The punctuation just indicates
this *or*that.

For lack of any better ideas atm, I'm suggesting brackets, since
they at least have some visual-mnemonic effect (a box) and seem
to act on the replacement value rather than the whole-property
syntax.

   content: [ url(image.png) ], "text"; /* does replacement */

   content: url(image.png), "text"; /* does insertion */

> and this incidentally _forces_ me to include a fallback of
 > some sort for the replacement URL?

There are other ways of forcing a fallback.

   content: [<content-list-including-uris>, ]* <content-list-minus-uris>

I'd rather do it that way, because then you can force a fallback
that has *no* uri-referenced resources. (The slash method just
requires a non-replaced fallback.)

BTW, wrt Anne's comments, the implicit fallback should be the initial
value, not 'contents'.

~fantasai

-- 
http://fantasai.inkedblade.net/contact
Received on Thursday, 15 April 2004 00:02:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:29 GMT