-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
37 lines (34 loc) · 846 Bytes
/
index.js
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
module.exports = ({ addComponents, theme }) => {
const screens = theme("screens", {});
const components = {
".debug-mq::after": {
position: "fixed",
bottom: "5px",
right: "5px",
backgroundColor: "black",
color: "white",
padding: "10px",
outline: "1px solid white",
borderRadius: "2px",
fontFamily: "monospace",
fontSize: "11px",
lineHeight: "10px",
zIndex: "2147483638",
content: "'Unset'",
},
":root": {
"--breakpoint": "'unset'",
},
};
Object.entries(screens).map(([breakpoint, width]) => {
components[`@screen ${breakpoint}`] = {
":root": {
"--breakpoint": `'${breakpoint}'`,
},
".debug-mq::after": {
content: `'${width} | ${breakpoint}'`,
},
};
});
addComponents(components);
};