Open Bug 1290093 Opened 8 years ago Updated 2 years ago

token-pasting using css variables

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

People

(Reporter: tromey, Unassigned)

Details

Attachments

(1 file)

Attached file css-token-paste.html
The attached test case consists of 3 divs.
The middle div has its background color set using:

#paste {
  --color: #ff0000;
  background-color: var(--color)aa;
}

Running this on firefox (fx-team from yesterday or so) shows that the
middle div has the same color as the final div, whose color is set as:

  <div style="background-color: #ff0000aa"></div>

That is, it appears that CSS variable substitution is pasting these
tokens together.

The spec is a bit vague on this, but my reading is that, because a variable
must consist of a valid token stream, the substitution must be done
using the tokens, and not using pasting.
It's definitely the intention that the substitution happens on the token stream rather than on the character stream, though I agree the spec could be clearer.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: