W3C home > Mailing lists > Public > www-style@w3.org > January 2015

[cssom] Serializing non-opaque colors, background-position keywords

From: Simon Pieters <simonp@opera.com>
Date: Wed, 28 Jan 2015 11:10:10 +0100
To: "www-style@w3.org" <www-style@w3.org>
Cc: josh@joshmatthews.net
Message-ID: <op.xs53u8jgidj3kv@simons-mbp>

Josh Matthews contributed some CSSOM serialization tests for  
web-platform-tests which uncovered some issues:

http://w3c-test.org/submissions/1427/cssom/serialize-values.html (remove  
submissions/1427/ if this 404s)

The CSSOM spec needs work in general around serialization, so these aren't  
questions of "what does the spec say now?" but rather "what do we want the  
spec to say?".

== Non-opaque colors ==

How should color: rgba(5, 7, 10, 0.9) be serialized? Gecko round-trips  
alpha as 0.9 but Blink makes it 0.901961. I think Gecko faithfully  
round-trips two decimals for colors. Should we specify Gecko's behavior of  
rounding to a "nicer" number?

Similarly for 'opacity' (although that is represented with higher  
precision I think).

== background-position keywords ==

How should background-position: 0% top be serialized? For element.style,  
Gecko round-trips keywords, Blink converts to percentages. For  
getComputedStyle, both convert to percentages. I think the spec for  
background-position says keywords compute to percentages.

Simon Pieters
Opera Software
Received on Wednesday, 28 January 2015 10:10:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:50 UTC