CSS Custom Properties serialize incorrectly when set to css-wide keywords (e.g. initial, inherit) |
|
Issue description
Setting a custom property to a css-wide keyword (initial, inherit, unset) works correctly for inheritance, but serialization is broken:
>> $0.style.cssText = '--a: initial ; --b:inherit'
>> $0.style.cssText
"--a:; --b:;"
>> $0.style.getPropertyValue("--a")
""
Interestingly, FF also does the wrong thing, "--ainitial; --binitial;".
,
Jul 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fffdf72e66e5aadec1c74bbbb7f4b60d4c629cfa commit fffdf72e66e5aadec1c74bbbb7f4b60d4c629cfa Author: rob.buis <rob.buis@samsung.com> Date: Fri Jul 29 16:31:17 2016 Fix serialization of css-wide keywords in custom properties Serialize css-wide keywords in custom properties by prefixing it with a space character and then serialing the keyword itself (inherit/initial/unset). BUG= 632242 Review-Url: https://codereview.chromium.org/2188343002 Cr-Commit-Position: refs/heads/master@{#408655} [delete] https://crrev.com/6104167b0bf16a3520a898dbe67227637d1c214e/third_party/WebKit/LayoutTests/fast/css/variables/inherit-in-inline-style-expected.txt [modify] https://crrev.com/fffdf72e66e5aadec1c74bbbb7f4b60d4c629cfa/third_party/WebKit/LayoutTests/fast/css/variables/inherit-in-inline-style.html [modify] https://crrev.com/fffdf72e66e5aadec1c74bbbb7f4b60d4c629cfa/third_party/WebKit/Source/core/css/CSSCustomPropertyDeclaration.cpp [modify] https://crrev.com/fffdf72e66e5aadec1c74bbbb7f4b60d4c629cfa/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
,
Jul 29 2016
,
Oct 14 2016
Issue 655756 has been merged into this issue.
,
Nov 1 2016
|
|
►
Sign in to add a comment |
|
Comment 1 by rob.buis@chromium.org
, Jul 28 2016Status: Assigned (was: Available)