forked from erfaga/explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtailwind.config.ts
More file actions
55 lines (51 loc) · 1.54 KB
/
tailwind.config.ts
File metadata and controls
55 lines (51 loc) · 1.54 KB
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
import type { Config } from 'tailwindcss';
const breakpoints = new Map([
['xxs', 320],
['xs', 375],
['sm', 576],
['md', 768],
['lg', 992],
['xl', 1200],
['xxl', 1400],
]);
const config: Config = {
content: ['./app/**/*.{ts,tsx}'],
plugins: [],
prefix: 'e-',
theme: {
extend: {
boxShadow: {
// border for active states from Dashkit
active: '0 0 0 0.15rem #33a382',
},
gridTemplateColumns: {
// Grid template for TokenExtensions
'12-ext': 'repeat(12, minmax(0, 1fr))',
},
},
/* eslint-disable sort-keys-fix/sort-keys-fix */
screens: {
'max-sm': getScreenDim('sm', -1),
'max-md': getScreenDim('md', -1),
xxs: getScreenDim('xxs'),
xs: getScreenDim('xs'),
sm: getScreenDim('sm'),
md: getScreenDim('md'),
lg: getScreenDim('lg'),
xl: getScreenDim('xl'),
xxl: getScreenDim('xxl'),
mobile: getScreenDim('sm'),
tablet: getScreenDim('md'),
laptop: getScreenDim('lg'),
desktop: getScreenDim('xl'),
},
/* eslint-enable sort-keys-fix/sort-keys-fix */
},
};
export default config;
// adjust breakpoint 1px up see previous layout on the "edge"
function getScreenDim(label: string, shift = 1) {
const a = breakpoints.get(label);
if (!a) throw new Error(`Unknown breakpoint: ${label}`);
return `${a + shift}px`;
}