- From: Mats Palmgren <mats.palmgren@bredband.net>
- Date: Wed, 06 Jun 2007 06:41:53 +0200
- To: Anne van Kesteren <annevk@opera.com>
- CC: Boris Zbarsky <bzbarsky@MIT.EDU>, W3C CSS List <www-style@w3.org>
Anne van Kesteren wrote:
> Testing shows that Internet Explorer 7 does not support it and Opera 9
> and Firefox 2 do...
Firefox parses '1em !important' as '1em' (generally, it ignores a trailing
';' '}' and '!' and anything that follows those tokens).
This is a bug [1] which I'm about to fix.
This is different from what Opera 9 does, which accepts the value
(as Firefox) but also makes the !important affect the priority
of the declaration (unlike Firefox).
> Given that .width is basically a shorthand for
> setProperty("width", setted value, null) I suppose what Internet
> Explorer 7 does is more logical. Except that it throws an exception. It
> seems more natural to simply ignore the setting to maintain the forward
> compatible parsing rules of CSS.
I agree that ignoring it as an illegal value is the way to go (and this
is what I did in bug 383075), thanks for the clarification.
> Also, "setted value" above has to be parsed per the "S* expr" grammar
> from CSS 2.1 (or some superset of that if the browser supports more).
> Would specifying something to that effect make sense?
I think "S* expr S*" is what we want, and I do think it needs to
be explicitly specified. BTW, I think the spec should have text to
specify where whitespace is accepted for other methods/parameters too.
An example of how to quote spaces to make them part of a value
would be nice.
> Probably indicating that including !important would lead to the
> method call being ignored?
Yes, please point out this case explicitly, for clarity.
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=383075
Thanks,
Mats Palmgren
Received on Wednesday, 6 June 2007 04:42:01 UTC