New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 617694 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

CSS variable, #30000ee is read as #\30 000ee

Reported by cyril.au...@gmail.com, Jun 6 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2756.0 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. https://jsfiddle.net/crl/e1z3Lvc0/13/
2. open console
3. 

What is the expected behavior?
#30000ee

What went wrong?
#\30 000ee 

Does it occur on multiple sites: N/A

Is it a problem with a plugin? N/A 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 53.0.2756.0  Channel: dev
OS Version: 10.0
Flash Version: Shockwave Flash 22.0 r0
 
Cc: rnimmagadda@chromium.org
Components: Platform>DevTools Blink>CSS
Labels: -Type-Compat M-52 OS-Linux OS-Mac Type-Bug
Status: Untriaged (was: Unconfirmed)
Able to repro this issue on Windows 7, MAC (10.11.5) & Ubuntu (14.04) for Google Chrome Stable Version - 51.0.2704.84

This is a Non-Regression issue existing from M49 - # 49.0.2610.0 

Before this build the error value isn't displayed.
> CSS.escape("0000ee")
"\30 000ee"

Comment 3 by r...@opera.com, Jun 7 2016

Cc: timloh@chromium.org shans@chromium.org
Labels: -OS-Windows -Pri-2 -Arch-x86_64 -OS-Mac OS-All Pri-3
Status: Available (was: Untriaged)
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp?l=220-221
Components: -Platform>DevTools
Labels: -OS-Linux Hotlist-Interop
Project Member

Comment 5 by sheriffbot@chromium.org, Jun 7 2016

Labels: -M-52 M-53 MovedFrom-52
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
 Issue 621418  has been merged into this issue.
Labels: Hotlist-Polish
Per the comment, were we trying to maintain compatibility with the previous implementation, other browsers, or something else entirely?

This behavior is pretty surprising and doesn't allow the color picker in devtools to adjust these values.
Labels: -Pri-3 Pri-1
Owner: timloh@chromium.org
Status: Assigned (was: Available)
This gets worse.

'M20.8' serializes as 'M200.8'

It appears that the only requirement from the spec is that the serialized value roundtrips. Firefox does a much better job of preserving the original property value.

Comment 9 by timloh@chromium.org, Jun 22 2016

Why is this P1?
It's a pretty major interop issue in a new feature. We should figure out what to do before usage increases. It's also trivially easy to run into when using custom paint.
fwiw Safari also behaves differently

> $0.style.cssText = '--foo: #0000ee'
< "--foo: #0000ee" = $2
> $0.style.cssText 
< "--foo: rgb(0, 0, 238);" = $3
Owner: ramy...@samsung.com
Status: Started (was: Assigned)
Project Member

Comment 14 by sheriffbot@chromium.org, Jul 6 2016

Labels: -M-53 -Pri-1 M-54 MovedFrom-53 Pri-2
This issue is Pri-1 but has already been moved once. Lowering the priority and moving to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Fixed (was: Started)
Should be fixed by #13
Cc: tkonch...@chromium.org
 Issue 617514  has been merged into this issue.
Status: Available (was: Fixed)
Wasn't this only fixed for color?
Status: Fixed (was: Available)
The bug report is for "CSS variable, #30000ee is read as #\30 000ee" though.
Status: Available (was: Fixed)
Summary: CSS variable serialization is not interoperable (was: CSS variable, #30000ee is read as #\30 000ee )
That's just a symptom of the larger problem. eg. comment #8. We're not interoperable with the implementation in Firefox.
 Issue 631024  has been merged into this issue.
I can't get the example in comment #8 reproducing? What I get here is:

$0.style.cssText = "--foo: 'M20.8'"
"--foo: 'M20.8'"
$0.style.cssText 
"--foo: "M20.8";"

Where does this still fail with variables?
eg.

element.style.setProperty('--a', 'M20.8')
element.style.getPropertyValue('--a') -> 'M200.8'
Owner: ----
Owner: ramy...@samsung.com
Status: Fixed (was: Available)
Summary: CSS variable, #30000ee is read as #\30 000ee (was: CSS variable serialization is not interoperable)
I forked off the part about making this match exactly into a separate bug 661854

Sign in to add a comment