-
Notifications
You must be signed in to change notification settings - Fork 0
/
nested.jic
54 lines (49 loc) · 1.01 KB
/
nested.jic
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
53
54
/* Nested Container Queries */
${containerQuery('article', el => 200 <= el.offsetWidth && el.offsetWidth < 300, `
:self:before {
content: '200px';
}
:self {
background: lightskyblue;
}
`)}
${containerQuery('article', el => 300 <= el.offsetWidth && el.offsetWidth < 400, `
:self:before {
content: '300px';
}
:self {
background: pink;
}
`)}
${containerQuery('article', el => 400 <= el.offsetWidth && el.offsetWidth < 500, `
:self:before {
content: '400px';
}
:self {
background: lightgreen;
}
`)}
${containerQuery('article', el => 500 <= el.offsetWidth && el.offsetWidth < 600, `
:self:before {
content: '500px';
}
:self {
background: coral;
}
`)}
${containerQuery('article', el => 600 <= el.offsetWidth && el.offsetWidth < 700, `
:self:before {
content: '600px';
}
:self {
background: mediumslateblue;
}
`)}
${containerQuery('article', el => 700 <= el.offsetWidth, `
:self:before {
content: '700px';
}
:self {
background: khaki;
}
`)}