New issue
Advanced search Search tips

Issue 633300 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Aug 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

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
 
Screen Shot 2016-08-01 at 2.36.44 PM.png
176 KB View Download
I believe this is fixed, see  crbug.com/617694 . You should be able to verify this by using a (Mac) Chrome Canary.
Yes, I can confirm that this is fixed in Canary. Thanks!
Status: Fixed (was: Unconfirmed)

Sign in to add a comment