W3C home > Mailing lists > Public > www-style@w3.org > November 1998

Re: Content property (again)

From: Christian Kaufhold <ch.kaufhold@t-online.de>
Date: Mon, 16 Nov 1998 21:33:39 +0100
Message-ID: <001301be11a0$6cca7640$b1439d3e@standard>
To: "Daniel Glazman" <Daniel.Glazman@der.edf.fr>
Cc: <www-style@w3.org>
Daniel Glazman wrote:
>This raises two difficulties :
>
>1) conformance with CSS general syntax (section 4.1.1). 'declaration'
>is not in the definition of 'any' which is the only definition allowed
>between the name of an at-rule and the following block.

According to the general syntax, it would first be parsed as any* (which
I believe is possible), and then it would have to be interpreted as
"declaration" (when the @try rule is recognized).

>2) the 'if' case is only interesting if you also have the 'else' case
>and we see no easy way to declare that ! Think about something like (in
>the formalism you propose)
>
> @try declaration1 { block1 } { block2 };
>
>where block1 is applied if declaration1 is valid, and block2 if not.
>If declaration1 is not valid, all the rule is thrown away according to
>section 4.2 ! So block2 cannot be applied...

I don't quite understand that.

I thought about using an @else rule as well. It would apply if none of
the @try possibilities are possible. But I think this can be emulated by
putting all "backup" declarations before the @try block which then will
(have to) overwrite them:
BODY
{
    color:green;
    @try background-image:url(back.gif)
    {
        color:black;
    }
}
This way CSS2 parsers will also be able to understand the first
declaration and ignore only the @try rule.

Christian Kaufhold
Received on Monday, 16 November 1998 20:36:14 GMT

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