Repository navigation
Expand file tree
/
Copy pathtailwind.config.ts
More file actions
66 lines (61 loc) · 1.85 KB
/
Copy pathtailwind.config.ts
File metadata and controls
66 lines (61 loc) · 1.85 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
56
57
58
59
60
61
62
63
64
65
66
// Copyright (c) Mysten Labs, Inc.
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
import colors from 'tailwindcss/colors';
import { type Config } from 'tailwindcss';
import plugin from 'tailwindcss/plugin';
// Note: exception for the tailwind preset import
import uiKitResponsivePreset from '../../apps/ui-kit/src/lib/tailwind/responsive.presets';
import { pxToRem } from '../../apps/ui-kit/src/lib/tailwind/helpers';
const CONTAINER_BREAKPOINTS = {
tablet: 1024,
desktop: 1280,
ultrawide: 1920,
};
const CONTAINER_MAX_WIDTH = 1600;
const fluidContainer = {
width: '100%',
maxWidth: pxToRem(CONTAINER_MAX_WIDTH),
marginInline: 'auto',
paddingInline: pxToRem(20),
[`@media (min-width: ${CONTAINER_BREAKPOINTS.tablet}px)`]: {
paddingInline: pxToRem(32),
},
[`@media (min-width: ${CONTAINER_BREAKPOINTS.desktop}px)`]: {
paddingInline: pxToRem(48),
},
[`@media (min-width: ${CONTAINER_BREAKPOINTS.ultrawide}px)`]: {
paddingInline: pxToRem(64),
},
};
export default {
presets: [uiKitResponsivePreset],
content: [
'./src/**/*.{js,jsx,ts,tsx}',
'./../ui-kit/src/lib/**/*.{js,jsx,ts,tsx}',
'./../core/src/components/**/*.{ts,jsx,tsx}',
],
darkMode: 'selector',
corePlugins: {
container: false,
},
theme: {
extend: {
colors: {
white: colors.white,
black: colors.black,
transparent: colors.transparent,
inherit: colors.inherit,
},
height: {
header: '80px',
'mobile-header': '120px',
},
},
},
plugins: [
plugin(({ addComponents }) => {
addComponents({ '.container': fluidContainer });
}),
],
} satisfies Partial<Config>;