starter-blog/tailwind.config.js

163 lines
4.8 KiB
JavaScript
Raw Normal View History

2021-01-09 10:50:45 +01:00
const defaultTheme = require('tailwindcss/defaultTheme')
const colors = require('tailwindcss/colors')
module.exports = {
2022-02-05 17:04:33 +01:00
experimental: {
optimizeUniversalDefaults: true,
},
2021-12-15 11:05:37 +01:00
content: ['./pages/**/*.js', './components/**/*.js', './layouts/**/*.js', './lib/**/*.js'],
2021-01-09 10:50:45 +01:00
darkMode: 'class',
theme: {
extend: {
spacing: {
'9/16': '56.25%',
},
lineHeight: {
11: '2.75rem',
12: '3rem',
13: '3.25rem',
14: '3.5rem',
},
fontFamily: {
2022-02-01 09:20:15 +01:00
sans: ['InterVariable', ...defaultTheme.fontFamily.sans],
2021-01-09 10:50:45 +01:00
},
colors: {
2021-06-19 12:34:44 +02:00
primary: colors.teal,
2021-12-15 11:05:37 +01:00
gray: colors.neutral,
2021-01-09 10:50:45 +01:00
},
typography: (theme) => ({
DEFAULT: {
css: {
color: theme('colors.gray.700'),
a: {
color: theme('colors.primary.500'),
2021-01-09 10:50:45 +01:00
'&:hover': {
2022-01-23 09:46:41 +01:00
color: `${theme('colors.primary.600')} !important`,
2021-01-09 10:50:45 +01:00
},
code: { color: theme('colors.primary.400') },
2021-01-09 10:50:45 +01:00
},
h1: {
fontWeight: '700',
letterSpacing: theme('letterSpacing.tight'),
color: theme('colors.gray.900'),
},
h2: {
fontWeight: '700',
letterSpacing: theme('letterSpacing.tight'),
color: theme('colors.gray.900'),
},
h3: {
fontWeight: '600',
color: theme('colors.gray.900'),
},
'h4,h5,h6': {
color: theme('colors.gray.900'),
},
2021-12-15 11:05:37 +01:00
pre: {
backgroundColor: theme('colors.gray.800'),
},
2021-01-09 10:50:45 +01:00
code: {
color: theme('colors.pink.500'),
backgroundColor: theme('colors.gray.100'),
paddingLeft: '4px',
paddingRight: '4px',
paddingTop: '2px',
paddingBottom: '2px',
borderRadius: '0.25rem',
},
2021-12-19 12:06:08 +01:00
'code::before': {
2021-01-09 10:50:45 +01:00
content: 'none',
},
2021-12-19 12:06:08 +01:00
'code::after': {
2021-01-09 10:50:45 +01:00
content: 'none',
},
2021-08-06 16:13:30 +02:00
details: {
backgroundColor: theme('colors.gray.100'),
paddingLeft: '4px',
paddingRight: '4px',
paddingTop: '2px',
paddingBottom: '2px',
borderRadius: '0.25rem',
},
2021-01-09 10:50:45 +01:00
hr: { borderColor: theme('colors.gray.200') },
2021-12-19 12:06:08 +01:00
'ol li::marker': {
fontWeight: '600',
color: theme('colors.gray.500'),
},
'ul li::marker': {
2021-01-09 10:50:45 +01:00
backgroundColor: theme('colors.gray.500'),
},
strong: { color: theme('colors.gray.600') },
blockquote: {
color: theme('colors.gray.900'),
borderLeftColor: theme('colors.gray.200'),
},
},
},
dark: {
css: {
color: theme('colors.gray.300'),
a: {
color: theme('colors.primary.500'),
2021-01-09 10:50:45 +01:00
'&:hover': {
2022-01-23 09:46:41 +01:00
color: `${theme('colors.primary.400')} !important`,
2021-01-09 10:50:45 +01:00
},
code: { color: theme('colors.primary.400') },
2021-01-09 10:50:45 +01:00
},
h1: {
fontWeight: '700',
letterSpacing: theme('letterSpacing.tight'),
color: theme('colors.gray.100'),
},
h2: {
fontWeight: '700',
letterSpacing: theme('letterSpacing.tight'),
color: theme('colors.gray.100'),
},
h3: {
fontWeight: '600',
color: theme('colors.gray.100'),
},
'h4,h5,h6': {
color: theme('colors.gray.100'),
},
2021-12-15 11:05:37 +01:00
pre: {
backgroundColor: theme('colors.gray.800'),
},
2021-01-09 10:50:45 +01:00
code: {
backgroundColor: theme('colors.gray.800'),
},
2021-08-06 16:13:30 +02:00
details: {
backgroundColor: theme('colors.gray.800'),
},
2021-01-09 10:50:45 +01:00
hr: { borderColor: theme('colors.gray.700') },
2021-12-19 12:06:08 +01:00
'ol li::marker': {
fontWeight: '600',
color: theme('colors.gray.400'),
},
'ul li::marker': {
2021-01-09 10:50:45 +01:00
backgroundColor: theme('colors.gray.400'),
},
strong: { color: theme('colors.gray.100') },
thead: {
2022-01-04 16:40:19 +01:00
th: {
color: theme('colors.gray.100'),
},
2021-01-09 10:50:45 +01:00
},
tbody: {
tr: {
borderBottomColor: theme('colors.gray.700'),
},
},
blockquote: {
color: theme('colors.gray.100'),
borderLeftColor: theme('colors.gray.700'),
},
},
},
}),
},
},
plugins: [require('@tailwindcss/forms'), require('@tailwindcss/typography')],
}