W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2017

Re: [csswg-drafts] [css-cascade] About omitted subproperty value in shorthand

From: Xidorn Quan via GitHub <sysbot+gh@w3.org>
Date: Sun, 05 Mar 2017 23:16:55 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-284271833-1488755814-sysbot+gh@w3.org>
> Oh I was not speaking about cssText serialization, but more that I 
like el.style.backgroundSize returning "initial" instead of "auto" 
because "auto" was never specified by the author; the property has its
 "initial| value instead, which happens to be auto.

As I mentioned before, making it returning `initial` instead of 
initial value like `auto` makes serialization code unnecessarily more 
complicated and error-prone, and it doesn't even work in many cases. 
For `background-size` particularly, what should `background: url(a) 
100%, url(b);` produce? `background-size: 100%, initial`? 

What would you expect from the following code to output?
<!DOCTYPE html>
<div id="ref" style="background: url(#a), url(#b)"></div>
<div id="test"></div>
var ref = document.getElementById('ref');
var test = document.getElementById('test');
test.style.backgroundSize = ref.style.backgroundSize;

GitHub Notification of comment by upsuper
Please view or discuss this issue at 
 using your GitHub account
Received on Sunday, 5 March 2017 23:17:02 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:09 UTC