Replace the gruvbox palette with everforest, using the "paper" light background (#efe6cd) rather than everforest's stock #fffbef, which read too bright. - gray is remapped to the everforest neutral ramp: 50-300 are the paper background steps, 900/950 the dark canvas (#2d353b / #232a2e). - primary-* variables now carry everforest green (#8da101 light, #a7c080 dark) instead of gruvbox blue. - article prose gets explicit --tw-prose-* / --tw-prose-invert-* overrides. The typography plugin ships Tailwind's own grays, so without this the body copy, headings, rules and code blocks stayed slate on a warm background. - inline code is hardcoded to indigo-500 by the plugin, so it needs a rule of its own; links keep primary-400 via the typography config. - theme-color meta and the logo mark follow the palette. - the 404 button and the active theme-menu chip were white-on-accent, which is unreadable on lime (2.9:1); they now use dark text on primary-500 (5.0:1 light, 7.3:1 dark).
99 lines
2.9 KiB
JavaScript
99 lines
2.9 KiB
JavaScript
// @ts-check
|
||
const { fontFamily } = require('tailwindcss/defaultTheme')
|
||
const colors = require('tailwindcss/colors')
|
||
|
||
/** @type {import("tailwindcss/types").Config } */
|
||
module.exports = {
|
||
content: [
|
||
'./node_modules/pliny/**/*.js',
|
||
'./app/**/*.{js,ts,jsx,tsx}',
|
||
'./pages/**/*.{js,ts,tsx}',
|
||
'./components/**/*.{js,ts,tsx}',
|
||
'./layouts/**/*.{js,ts,tsx}',
|
||
'./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],
|
||
},
|
||
colors: {
|
||
// Everforest accent (green). Light and dark use different greens, so the
|
||
// ramp resolves through CSS variables that flip under `.dark` — see css/tailwind.css.
|
||
primary: {
|
||
300: 'rgb(var(--primary-300) / <alpha-value>)',
|
||
400: 'rgb(var(--primary-400) / <alpha-value>)',
|
||
500: 'rgb(var(--primary-500) / <alpha-value>)',
|
||
600: 'rgb(var(--primary-600) / <alpha-value>)',
|
||
700: 'rgb(var(--primary-700) / <alpha-value>)',
|
||
},
|
||
// Everforest neutral ramp (bg0 → bg-dim) mapped onto Tailwind's 50–950 steps.
|
||
// 50–300 are the "paper" light background; 900/950 are the dark canvas.
|
||
gray: {
|
||
50: '#efe6cd', // bg0 (paper)
|
||
100: '#e8dfc3', // bg1
|
||
200: '#e0d7ba', // bg2
|
||
300: '#d3caac', // bg3
|
||
400: '#939f91', // fg (muted)
|
||
500: '#7a8471', // grey1
|
||
600: '#5c6a72', // grey0
|
||
700: '#475258', // fg dark
|
||
800: '#3d484d', // bg5
|
||
900: '#2d353b', // bg0 dark
|
||
950: '#232a2e', // bg-dim
|
||
},
|
||
},
|
||
zIndex: {
|
||
60: '60',
|
||
70: '70',
|
||
80: '80',
|
||
},
|
||
typography: ({ theme }) => ({
|
||
DEFAULT: {
|
||
css: {
|
||
a: {
|
||
color: 'rgb(var(--primary-500))',
|
||
'&:hover': {
|
||
color: 'rgb(var(--primary-600))',
|
||
},
|
||
code: { color: 'rgb(var(--primary-400))' },
|
||
},
|
||
'h1,h2': {
|
||
fontWeight: '700',
|
||
letterSpacing: theme('letterSpacing.tight'),
|
||
},
|
||
h3: {
|
||
fontWeight: '600',
|
||
},
|
||
code: {
|
||
color: theme('colors.indigo.500'),
|
||
},
|
||
},
|
||
},
|
||
invert: {
|
||
css: {
|
||
a: {
|
||
color: 'rgb(var(--primary-500))',
|
||
'&:hover': {
|
||
color: 'rgb(var(--primary-400))',
|
||
},
|
||
code: { color: 'rgb(var(--primary-400))' },
|
||
},
|
||
'h1,h2,h3,h4,h5,h6': {
|
||
color: theme('colors.gray.100'),
|
||
},
|
||
},
|
||
},
|
||
}),
|
||
},
|
||
},
|
||
plugins: [require('@tailwindcss/forms'), require('@tailwindcss/typography')],
|
||
}
|