-
Notifications
You must be signed in to change notification settings - Fork 69
/
tailwind.config.cjs
36 lines (35 loc) · 1.05 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
const plugin = require('tailwindcss/plugin');
const stepinTheme = require('stepin/es/style/tailwind.config.cjs');
module.exports = {
presets: [stepinTheme],
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx,less,css}', './docs/**/*.{vue,ts,jsx,tsx,less,css,md}'],
darkMode: 'class', // or 'media' or 'class'
corePlugins: {
preflight: false,
},
theme: {
extend: {
screens: {
sm: '480px',
md: '768px',
lg: '976px',
xl: '1440px',
xxl: '1536px',
},
},
},
plugins: [
plugin(function ({ addVariant, theme }) {
const addMedia = (name, minWidth) => {
const collapsedWidth = 160;
addVariant(name, [
`@media (min-width: ${minWidth}px)`,
`@media (min-width: ${minWidth - collapsedWidth}px) {.collapsed &}`,
]);
};
const screens = Object.keys(theme('screens'));
screens.forEach((name) => addMedia(`${name}x`, parseInt(theme(`screens.${name}`).replace('px', ''))));
}),
require('@tailwindcss/container-queries'),
],
};