Packages: CSS: variables bug(s)

Created on 5 May 2017  路  2Comments  路  Source: sublimehq/Packages

--x1: url(data:image/png;base64,PNG);
--x2: url(data:image/png;base64,PNG);
background-image: -webkit-image-set(var(--x1) 1x, var(--x2) 2x);

--1x: url(data:image/png;base64,PNG);
--2x: url(data:image/png;base64,PNG);
background-image: -webkit-image-set(var(--1x) 1x, var(--2x) 2x);

1

Chrome considers the second valid, which I think may be wrong. I'm not quite sure how to read the definition diagram, linked from here. It's a bug, but where is the question.

Most helpful comment

I've been informed by a Googler that Chrome is correct. This is addressed in an updated version of the diagram.

All 2 comments

That ident-token regex railroad diagram shows that the identifier can't start with a number, so it seems that ST's highlighting/scoping is correct there. EDIT: although it also shows that variables can't start with two dashes, which makes no sense...

I've been informed by a Googler that Chrome is correct. This is addressed in an updated version of the diagram.

Was this page helpful?
0 / 5 - 0 ratings