This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25426 - Don't escape --foo
Summary: Don't escape --foo
Status: RESOLVED FIXED
Alias: None
Product: CSS
Classification: Unclassified
Component: CSSOM (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-23 09:23 UTC by Simon Pieters
Modified: 2015-09-08 07:03 UTC (History)
1 user (show)

See Also:


Attachments

Description Simon Pieters 2014-04-23 09:23:16 UTC
http://dev.w3.org/csswg/cssom/#common-serializing-idioms

[[
If the character is the second character and is "-" (U+002D) and the first character is "-" as well, then the escaped character.
]]

css-syntax changed to allow --foo so maybe CSS.escape() shouldn't escape it?
Comment 1 Simon Pieters 2014-04-30 05:27:27 UTC
https://dvcs.w3.org/hg/csswg/rev/98c61628c0e9
Comment 2 Mathias Bynens 2014-04-30 09:44:36 UTC
Polyfill + tests updated: https://github.com/mathiasbynens/CSS.escape/commit/3ff1913c7ac411a9108ef528aceb3cb6c1e0918d
Comment 3 Mathias Bynens 2015-09-07 18:08:10 UTC
This is problematic in browsers that ship `CSS.escape` before shipping an updated CSS parser (as per the latest css-syntax): https://code.google.com/p/chromium/issues/detail?id=528972#c3
Comment 4 Simon Pieters 2015-09-08 04:35:49 UTC
- and -- are not identifiers. Blink implements css-syntax. This is a bug in CSSOM.

https://drafts.csswg.org/css-syntax/#ident-token-diagram
Comment 6 Simon Pieters 2015-09-08 07:03:47 UTC
Oops, misread css-syntax. '--' was OK.
https://github.com/w3c/csswg-drafts/commit/7707b15e6d42a6cb4b04da6b6ecb680c0e9365da