-
Notifications
You must be signed in to change notification settings - Fork 0
/
widget.jic
42 lines (36 loc) · 929 Bytes
/
widget.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
/* Widget Container Queries */
${containerQuery('.widget', el => 100 <= el.offsetWidth && el.offsetWidth < 200, `
:self.widget {
background: red;
}
`)}
${containerQuery('.widget', el => 200 <= el.offsetWidth && el.offsetWidth < 300, `
:self.widget {
background: orange;
}
`)}
${containerQuery('.widget', el => 300 <= el.offsetWidth && el.offsetWidth < 400, `
:self.widget {
background: yellow;
}
`)}
${containerQuery('.widget', el => 400 <= el.offsetWidth && el.offsetWidth < 500, `
:self.widget {
background: lime;
}
`)}
${containerQuery('.widget', el => 500 <= el.offsetWidth && el.offsetWidth < 600, `
:self.widget {
background: blue;
}
`)}
${containerQuery('.widget', el => 600 <= el.offsetWidth && el.offsetWidth < 700, `
:self.widget {
background: indigo;
}
`)}
${containerQuery('.widget', el => 700 <= el.offsetWidth, `
:self.widget {
background: purple;
}
`)}