Re: [css3-color] multiple media and rgba()/hsla()

On Thursday 2008-03-13 15:23 +0100, Anne van Kesteren wrote:
> If you support both screen and print output and for screen you do support 
> an alpha channel and for print you don't. What happens with parsing  
> rgba()/hsla() in a style sheet targeted at both screen and print? I think 
> it should be acceptable to parse such a style sheet only once claiming  
> support for an alpha channel if screen is your primary medium. (Which has 
> the result of being potentially slightly crippled in print.)
>
> There's a note in the specification (shouldn't that be normative?) that  
> seems to forbid this and I think it should be reworded to allow this.  
> Maybe: "If RGBA values are not supported by the primary medium of the 
> user agent they should be treated like unrecognized values as per the CSS 
> forward compatibility parsing rules. ..."

I would prefer not to make any change here.  CSS forward-compatible
parsing rules are designed to allow authors to have fallback when
values are not supported; allowing this would break that.

If an implementation really had to leave these values unsupported in
print -- it's not clear to me why that would be needed, though -- I
think it ought to (if it had to have this limitation for printing)
have two separate parses of the style sheet (which could be done in
a single pass if needed, though).  That wouldn't interact so well
with the CSSOM, though.  But I'm comfortable calling anything less a
bug in the implementation.  It's probably easiest to fix that bug by
just supporting the same color values in print, and that's the fix
I'd strongly encourage.

I'm also skeptical that putting the text in the color module rather
than the syntax module would be the right thing to do.

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Tuesday, 13 May 2008 22:09:57 UTC