-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtailwind.config.js
74 lines (73 loc) · 2.03 KB
/
tailwind.config.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
const colors = require("@mui/material/colors");
const plugin = require("tailwindcss/plugin");
module.exports = {
mode: "jit",
content: ["./src/react/**/*.html", "./src/react/**/*.ts", "./src/react/**/*.tsx"],
important: true,
theme: {
extend: {
fontFamily: {
normal: "var(--inazuma-default-fontfamily)",
mono: "var(--inazuma-monospace-fontfamily)"
},
colors: {
transparent: "transparent",
current: "currentColor",
hoverHighlight: "#ffffff08",
highlight: "#ffffff16",
primary: colors.lime.A700,
secondary: colors.yellow.A700,
error: colors.red[700],
warning: colors.orange[700],
success: colors.green[700],
info: colors.blue[700],
background: "#222",
paper: "#333",
console: "#0003",
splitter: colors.grey[800],
titlebar: "#2a2a2a",
tooltip: "#333",
greytext: colors.grey[500],
gray: colors.grey,
backdrop: "#0003"
},
zIndex: {
9999: 9999,
999: 999
},
cursor: {
"col-resize": "col-resize",
"row-resize": "row-resize"
}
}
},
variants: {},
plugins: [
plugin(({ addUtilities }) => {
// add shorthand of "flex flex-(row|col|row-reverse|col-reverse) flex-(nowrap|wrap|wrap-reverse)"
const abbrs = {
col: "column",
"col-reverse": "column-reverse"
};
const newUtilities = {
".ellipsis": {
whiteSpace: "nowrap",
overflow: "hidden",
textOverflow: "ellipsis"
}
};
["row", "col", "row-reverse", "col-reverse"].forEach((direction) => {
["nowrap", "wrap", "wrap-reverse"].forEach((wrap) => {
const className = `.flex-${direction}-${wrap}`;
const style = {
display: "flex",
flexDirection: abbrs[direction] || direction,
flexWrap: wrap
};
newUtilities[className] = style;
});
});
addUtilities(newUtilities);
})
]
};