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

   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'.


Received on Thursday, 15 April 2004 00:02:38 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:12 UTC