Accessing cssText via document.styleSheets garbles color hashes
Reported by
alex.big...@kitware.com,
Aug 1 2016
|
||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36
Steps to reproduce the problem:
1. Load the following HTML file:
<style>
#test {
--customColor: #012345;
}
</style>
2. In the console, type:
document.styleSheets[0].cssRules[0].cssText
3. This is the result:
#test { --customColor: #\30 12345; }
What is the expected behavior?
The result should be:
#test { --customColor: #012345; }
What went wrong?
It appears that Chrome is attempting to interpret the first zero as a unicode character number. A screenshot of similar behavior is attached.
Did this work before? N/A
Chrome version: 51.0.2704.103 Channel: n/a
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 22.0 r0
,
Aug 1 2016
Yes, I can confirm that this is fixed in Canary. Thanks!
,
Aug 1 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by rob.b...@samsung.com
, Aug 1 2016