New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Tailwind 3.0 #515
Use Tailwind 3.0 #515
Changes from 4 commits
c4bfffe
417ee19
e1dacaf
53b37b5
b4df62f
7598d78
9eb40a7
243b107
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,15 +3,10 @@ | |
/** @type {import('tailwindcss/lib/util/createPlugin').default} */ | ||
// @ts-ignore | ||
const plugin = require('tailwindcss/plugin') | ||
const defaultConfig = require('tailwindcss/defaultConfig') | ||
|
||
const childrenPlugin = require('tailwindcss-children') | ||
|
||
/** @type {import('tailwindcss/tailwind-config').TailwindConfig} */ | ||
module.exports = { | ||
mode: 'jit', | ||
purge: ['./libs/ui/**/*.{ts,tsx,mdx}', './app/**/*.{ts,tsx}'], | ||
darkMode: false, | ||
content: ['./libs/ui/**/*.{ts,tsx,mdx}', './app/**/*.{ts,tsx}'], | ||
theme: { | ||
extend: { | ||
borderRadius: { | ||
|
@@ -76,18 +71,7 @@ module.exports = { | |
plugins: [ | ||
// imitation of the twin.macro svg: variant. svg:text-green-500 puts green | ||
// on an SVG that's an immediate child of the element | ||
plugin(function ({ addVariant, e }) { | ||
addVariant('svg', ({ modifySelectors, separator }) => { | ||
modifySelectors( | ||
({ className }) => `.${e(`svg${separator}${className}`)} > svg` | ||
) | ||
}) | ||
}), | ||
childrenPlugin, | ||
plugin(({ addVariant }) => addVariant('svg', '& > svg')), | ||
plugin(({ addVariant }) => addVariant('children', '& > *')), | ||
], | ||
/** | ||
* TODO: This isn't respected, need an upstream fix. | ||
* @see https://github.com/tailwindlabs/tailwindcss/issues/3949 | ||
*/ | ||
variantOrder: ['children', ...defaultConfig.variantOrder, 'svg'], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @zephraph I think this isn't needed anymore but let me know There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it's working, it's not needed 😄. I mean, this never did anything to begin with due to the upstream bug. |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.