|
3 | 3 | /** @type {import('tailwindcss/lib/util/createPlugin').default} */ |
4 | 4 | // @ts-ignore |
5 | 5 | const plugin = require('tailwindcss/plugin') |
6 | | -const defaultConfig = require('tailwindcss/defaultConfig') |
7 | | - |
8 | | -const childrenPlugin = require('tailwindcss-children') |
9 | 6 |
|
10 | 7 | /** @type {import('tailwindcss/tailwind-config').TailwindConfig} */ |
11 | 8 | module.exports = { |
12 | | - mode: 'jit', |
13 | | - purge: ['./libs/ui/**/*.{ts,tsx,mdx}', './app/**/*.{ts,tsx}'], |
14 | | - darkMode: false, |
| 9 | + content: ['./libs/ui/**/*.{ts,tsx,mdx}', './app/**/*.{ts,tsx}'], |
15 | 10 | theme: { |
16 | 11 | extend: { |
17 | 12 | borderRadius: { |
@@ -74,20 +69,11 @@ module.exports = { |
74 | 69 | }, |
75 | 70 | }, |
76 | 71 | plugins: [ |
77 | | - // imitation of the twin.macro svg: variant. svg:text-green-500 puts green |
78 | | - // on an SVG that's an immediate child of the element |
79 | | - plugin(function ({ addVariant, e }) { |
80 | | - addVariant('svg', ({ modifySelectors, separator }) => { |
81 | | - modifySelectors( |
82 | | - ({ className }) => `.${e(`svg${separator}${className}`)} > svg` |
83 | | - ) |
84 | | - }) |
| 72 | + plugin(({ addVariant }) => { |
| 73 | + // imitation of the twin.macro svg: variant. svg:text-green-500 puts green |
| 74 | + // on an SVG that's an immediate child of the element |
| 75 | + addVariant('svg', '& > svg') |
| 76 | + addVariant('children', '& > *') |
85 | 77 | }), |
86 | | - childrenPlugin, |
87 | 78 | ], |
88 | | - /** |
89 | | - * TODO: This isn't respected, need an upstream fix. |
90 | | - * @see https://github.com/tailwindlabs/tailwindcss/issues/3949 |
91 | | - */ |
92 | | - variantOrder: ['children', ...defaultConfig.variantOrder, 'svg'], |
93 | 79 | } |
0 commit comments