-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
85 lines (82 loc) · 2.06 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
75
76
77
78
79
80
81
82
83
84
85
const theme = require("./src/style/theme");
const colors = theme.colors.light;
const mappedColors = {};
for (const key of Object.keys(colors)) {
const mappedKey = key.replaceAll("/", "-");
mappedColors[mappedKey] = `var(--color-${mappedKey})`;
}
const scaleFactor = 1.2;
// base
const bodyText = { size: 17, lineHeight: 28, fontAdjustment: 0 };
// small
const subText = {
size: bodyText.size * (1 / scaleFactor),
lineHeight: 22,
fontAdjustment: 0,
};
const smallText = {
size: subText.size * (1 / scaleFactor),
lineHeight: 18,
fontAdjustment: 0,
};
// big
const heading3Text = {
size: bodyText.size * scaleFactor,
lineHeight: 32,
fontAdjustment: 0,
};
const heading2Text = {
size: heading3Text.size * scaleFactor,
lineHeight: 36,
fontAdjustment: 0,
};
const heading1Text = {
size: heading2Text.size * scaleFactor,
lineHeight: 44,
fontAdjustment: 0,
};
const bigText = {
size: heading1Text.size * scaleFactor,
lineHeight: 52,
fontAdjustment: 0,
};
const largeText = {
size: bigText.size * scaleFactor,
lineHeight: 64,
fontAdjustment: 0,
};
const jumboText = {
size: largeText.size * scaleFactor,
lineHeight: 76,
fontAdjustment: 0,
};
/** @type {import("tailwindcss").Config} */
module.exports = {
content: ["./src/**/*.{ts,tsx,md,mdx}"],
mode: "jit",
theme: {
// extend: {},
colors: {
...mappedColors,
transparent: "transparent",
},
fontSize: {
sub: [`${subText.size}px`, `${subText.lineHeight}px`],
small: [`${smallText.size}px`, `${smallText.lineHeight}px`],
body: [`${bodyText.size}px`, `${bodyText.lineHeight}px`],
big: [`${bigText.size}px`, `${bigText.lineHeight}px`],
h1: [`${heading1Text.size}px`, `${heading1Text.lineHeight}px`],
h2: [`${heading2Text.size}px`, `${heading2Text.lineHeight}px`],
h3: [`${heading3Text.size}px`, `${heading3Text.lineHeight}px`],
large: [`${largeText.size}px`, `${largeText.lineHeight}px`],
},
screens: {
xs: "0px",
s: "600px",
m: "960px",
l: "1280px",
xl: "1920px",
},
},
plugins: [],
};