-
-
Notifications
You must be signed in to change notification settings - Fork 102
/
tailwind.config.site.js
131 lines (129 loc) · 4.74 KB
/
tailwind.config.site.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
//--------------------------------------------------------------------------
// Tailwind site configuration
//--------------------------------------------------------------------------
//
// Use this file to completely define the current sites design system by
// adding and extending to Tailwinds default utility classes.
//
const defaultTheme = require('tailwindcss/defaultTheme')
const plugin = require('tailwindcss/plugin')
const colors = require('tailwindcss/colors')
module.exports = {
theme: {
// Here we define the default colors available. If you want to include
// all default Tailwind colors you should extend the colors instead.
colors: {
black: '#000',
white: '#fff',
// Neutrals: neutral colors, with a default fallback if you don't need shades. Always set a DEFAULT when you use shades.
neutral: {
DEFAULT: colors.slate['800'],
...colors.slate
},
// Primary: primary brand color with a default fallback if you don't need shades. Always set a DEFAULT when you use shades.
primary: {
DEFAULT: 'oklch(53.24% 0.301 290.86 / <alpha-value>)'
},
},
extend: {
// Set default transition durations and easing when using the transition utilities.
transitionDuration: {
DEFAULT: '300ms',
},
transitionTimingFunction: {
DEFAULT: 'cubic-bezier(0.4, 0, 0.2, 1)',
},
},
// Remove the font families you don't want to use.
fontFamily: {
mono: [
// Use a custom mono font for this site by changing 'Anonymous' to the
// font name you want and uncommenting the following line.
// 'Anonymous',
...defaultTheme.fontFamily.mono,
],
sans: [
// Use a custom sans serif font for this site by changing 'Gaultier' to the
// font name you want and uncommenting the following line.
// 'Gaultier',
...defaultTheme.fontFamily.sans,
],
serif: [
// Use a custom serif font for this site by changing 'Lavigne' to the
// font name you want and uncommenting the following line.
// 'Lavigne',
...defaultTheme.fontFamily.serif,
],
},
// The font weights available for this site.
fontWeight: {
// hairline: 100,
// thin: 200,
// light: 300,
normal: 400,
// medium: 500,
// semibold: 600,
bold: 700,
// extrabold: 800,
// black: 900,
},
},
plugins: [
plugin(function({ addBase, addComponents, addUtilities, theme }) {
addBase({
// Default color transition on links unless user prefers reduced motion.
'@media (prefers-reduced-motion: no-preference)': {
'a': {
transition: 'color .3s ease-in-out',
},
},
'html': {
color: theme('colors.neutral.DEFAULT'),
//--------------------------------------------------------------------------
// Set sans, serif or mono stack with optional custom font as default.
//--------------------------------------------------------------------------
// fontFamily: theme('fontFamily.mono'),
fontFamily: theme('fontFamily.sans'),
// fontFamily: theme('fontFamily.serif'),
},
':root': {
'--focus-outline-width': '2px',
'--focus-outline-offset': '3px',
'--focus-outline-color': 'currentColor',
'--focus-outline-style': 'dotted',
'--focus-form-outline-width': '3px',
'--focus-form-outline-offset': '0',
'--focus-form-outline-color': "theme('colors.primary.DEFAULT / .5')",
'--focus-form-outline-style': 'solid',
},
':focus': {
outlineWidth: 'var(--focus-outline-width, 2px)',
outlineOffset: 'var(--focus-outline-offset, 3px)',
outlineColor: 'var(--focus-outline-color, currentColor)',
outlineStyle: 'var(--focus-outline-style, dotted)',
},
'*:focus:not(:focus-visible)': {
outline: '2px solid transparent',
outlineOffset: '2px',
},
'input:not([type="button"]):focus, textarea:focus, select:focus': {
boxShadow: 'none',
outlineWidth: 'var(--focus-form-outline-width, 3px)',
outlineOffset: 'var(--focus-form-outline-offset, 0)',
outlineColor: 'var(--focus-form-outline-color, currentColor)',
outlineStyle: 'var(--focus-form-outline-style, solid)',
},
'mark': {
backgroundColor: "theme('colors.primary.DEFAULT / 1')",
color: theme('colors.white')
},
}),
// Custom components for this particular site.
addComponents({
}),
// Custom utilities for this particular site.
addUtilities({
})
}),
]
}