tailwind-nextjs-blog/tailwind.config.js

72 lines
1.8 KiB
JavaScript
Raw Normal View History

// @ts-check
const { fontFamily } = require('tailwindcss/defaultTheme')
2022-07-17 21:40:41 +08:00
const colors = require('tailwindcss/colors')
/** @type {import("tailwindcss/types").Config } */
2022-07-17 21:40:41 +08:00
module.exports = {
content: [
'./node_modules/pliny/**/*.js',
'./app/**/*.{js,ts,jsx,tsx}',
'./pages/**/*.{js,ts,tsx}',
'./components/**/*.{js,ts,tsx}',
'./layouts/**/*.{js,ts,tsx}',
2022-07-17 21:40:41 +08:00
'./data/**/*.mdx',
],
darkMode: 'class',
theme: {
extend: {
lineHeight: {
11: '2.75rem',
12: '3rem',
13: '3.25rem',
14: '3.5rem',
},
fontFamily: {
sans: ['var(--font-space-grotesk)', ...fontFamily.sans],
2022-07-17 21:40:41 +08:00
},
colors: {
primary: colors.teal,
gray: colors.neutral,
2022-07-17 21:40:41 +08:00
},
typography: ({ theme }) => ({
2022-07-17 21:40:41 +08:00
DEFAULT: {
css: {
a: {
color: theme('colors.primary.500'),
'&:hover': {
color: `${theme('colors.primary.600')}`,
2022-07-17 21:40:41 +08:00
},
code: { color: theme('colors.primary.400') },
},
'h1,h2': {
2022-07-17 21:40:41 +08:00
fontWeight: '700',
letterSpacing: theme('letterSpacing.tight'),
},
h3: {
fontWeight: '600',
},
code: {
color: theme('colors.pink.500'),
},
},
},
invert: {
2022-07-17 21:40:41 +08:00
css: {
a: {
color: theme('colors.primary.500'),
'&:hover': {
color: `${theme('colors.primary.400')}`,
2022-07-17 21:40:41 +08:00
},
code: { color: theme('colors.primary.400') },
},
'h1,h2,h3,h4,h5,h6': {
2022-07-17 21:40:41 +08:00
color: theme('colors.gray.100'),
},
},
},
}),
},
},
plugins: [require('@tailwindcss/forms'), require('@tailwindcss/typography')],
}