-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.mjs
48 lines (46 loc) · 1.13 KB
/
tailwind.config.mjs
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
const defaultTheme = require("tailwindcss/defaultTheme");
const round = (num) =>
num
.toFixed(7)
.replace(/(\.[0-9]+?)0+$/, "$1")
.replace(/\.0$/, "");
const rem = (px) => `${round(px / 16)}rem`;
const em = (px, base) => `${round(px / base)}em`;
module.exports = {
mode: "jit",
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
theme: {
extend: {
typography: ({ theme }) => ({
DEFAULT: {
css: {
code: {
fontWeight: "500",
backgroundColor: theme("colors.gray.100"),
paddingTop: em(2, 12),
paddingRight: em(4, 12),
paddingBottom: em(2, 12),
paddingLeft: em(4, 12),
borderRadius: rem(3),
},
"code::before": {
display: "none",
},
"code::after": {
display: "none",
},
},
},
}),
},
screens: {
xxs: "350px",
xs: "475px",
...defaultTheme.screens,
},
},
variants: {
extend: {},
},
plugins: [require("@tailwindcss/typography")],
};