mirror of
https://github.com/readest/readest.git
synced 2026-04-28 03:20:45 +00:00
54 lines
1.3 KiB
TypeScript
54 lines
1.3 KiB
TypeScript
import type { Config } from 'tailwindcss';
|
|
import { themes } from './src/styles/themes.ts';
|
|
import daisyui from 'daisyui';
|
|
import typography from '@tailwindcss/typography';
|
|
import plugin from 'tailwindcss/plugin';
|
|
|
|
const config: Config = {
|
|
content: [
|
|
'./src/pages/**/*.{js,ts,jsx,tsx,mdx}',
|
|
'./src/components/**/*.{js,ts,jsx,tsx,mdx}',
|
|
'./src/app/**/*.{js,ts,jsx,tsx,mdx}',
|
|
],
|
|
safelist: [
|
|
{ pattern: /bg-./ },
|
|
{ pattern: /text-./ },
|
|
{ pattern: /fill-./ },
|
|
{ pattern: /decoration-./ },
|
|
{ pattern: /tooltip-./ },
|
|
],
|
|
theme: {
|
|
extend: {
|
|
fontFamily: {
|
|
sans: ['Inter', 'ui-sans-serif', 'system-ui', 'sans-serif'],
|
|
},
|
|
colors: {
|
|
background: 'var(--background)',
|
|
foreground: 'var(--foreground)',
|
|
},
|
|
},
|
|
},
|
|
plugins: [
|
|
daisyui,
|
|
typography,
|
|
plugin(function ({ addVariant }) {
|
|
addVariant('eink', 'html[data-eink="true"] &');
|
|
addVariant('not-eink', 'html:not([data-eink="true"]) &');
|
|
}),
|
|
],
|
|
daisyui: {
|
|
themes: themes.reduce(
|
|
(acc, { name, colors }) => {
|
|
acc.push({
|
|
[`${name}-light`]: colors.light,
|
|
});
|
|
acc.push({
|
|
[`${name}-dark`]: colors.dark,
|
|
});
|
|
return acc;
|
|
},
|
|
['light', 'dark'] as (Record<string, unknown> | string)[],
|
|
),
|
|
},
|
|
};
|
|
export default config;
|