- Notifications
You must be signed in to change notification settings - Fork 3.3k
/
Copy pathvariable-reference-without-whitespace.html
52 lines (49 loc) · 1.56 KB
/
variable-reference-without-whitespace.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<title>Variable reference without whitespace</title>
<linkrel=matchhref=reference/variable-reference-without-whitespace-ref.html>
<linkrel=helphref=http://www.w3.org/TR/css-variables-1/#syntax>
<linkrel=authortitle="Simon Sapin" href=http://exyr.org/about/>
<metarel=assertcontent="
A variable reference followed by something without whitespace in between
must not be interpreted together as a single identifier.
Custom property values are sequences of tokens, not strings.">
<style>
p {
counter-reset:----a -a;
--dash:-;
}
#test_1span::before {
counter-increment:var(--dash)-;
content:counter(--);
}
#test_2span::before {
counter-increment:var(--dash)-a;
content:counter(--a);
}
#test_3span::before {
counter-increment:var(--dash)a;
content:counter(-a);
}
#control_1span::before {
counter-increment:--;
content:counter(--);
}
#control_2span::before {
counter-increment:--a;
content:counter(--a);
}
#control_3span::before {
counter-increment: -a;
content:counter(-a);
}
</style>
<p>The next four lines must be identical, containing only zeroes:
<pid="test_1"><span></span><span></span><span></span>
<pid="test_2"><span></span><span></span><span></span>
<pid="test_3"><span></span><span></span><span></span>
<p>0 0 0
<p>The next four lines must be identical, containing increasing integers:
<pid="control_1"><span></span><span></span><span></span>
<pid="control_2"><span></span><span></span><span></span>
<pid="control_3"><span></span><span></span><span></span>
<p>1 2 3