-
Notifications
You must be signed in to change notification settings - Fork 1
/
tailwind.config.cjs
56 lines (53 loc) · 1.63 KB
/
tailwind.config.cjs
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
// @ts-check
/* eslint-disable */
const contentFileFilter = __dirname + "/hn-server/**/*.{rs,html.j2}";
const {
addSysColors,
} = require("./design-tools/out/tailwind/tailwind-addSysColors.cjs");
const {
extendWithTextSizes,
} = require("./design-tools/out/tailwind/tailwind-apTypography.cjs");
const {
addItemStateVariants,
} = require("./design-tools/out/tailwind/tailwind-addItemStateVariants.cjs");
const {
designSystemTypographySettings,
designSystemColorSettings,
} = require("./design-tools/out/design-system-settings.cjs");
// console.log(JSON.stringify(designSystemTypographySettings, null, 2))
/** @type {Partial<import("tailwindcss").Config>} */
const config = {
// Note that this selection determines global.css hot reload
// so, this is why if any tsx file changes, then the entire tailwind
// gets re-generated...
content: [contentFileFilter],
safelist: [
{
pattern: /^text-(ui|content|title|mono)/,
variants: [],
},
],
theme: {
extend: {},
// remove sizes which are replaced by {extendWithTextSizes}
fontSize: {},
fontFamily: {},
},
plugins: [
// see color-emoji.css which specifies the custom font-family
extendWithTextSizes({
settings: designSystemTypographySettings,
webFallbackFonts: {
ui: ["system-ui", "sans-serif", "color-emoji"],
content: ["system-ui", "sans-serif", "color-emoji"],
title: ["apui", "system-ui", "color-emoji"],
mono: ["monospace", "color-emoji"],
},
}),
addSysColors({
settings: designSystemColorSettings,
}),
addItemStateVariants({ settings: {} }),
],
};
module.exports = config;