We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Setting multiple selectors in the same CSS rule returns an unexpected result: For example:
import { TailwindConverter } from 'css-to-tailwindcss'; import postcssNested from "postcss-nested"; const converter = new TailwindConverter({ remInPx: 16, // set null if you don't want to convert rem to pixels postCSSPlugins: [postcssNested], // add any postcss plugins to this array tailwindConfig: { // your tailwind config here content: [], theme: { extend: { colors: {}, }, }, }, }); const inputCSS = ` .test{ color:red; &:hover, &:focus{ color: blue; } }`; converter.convertCSS(inputCSS).then(({ convertedRoot, nodes }) => { console.log(convertedRoot.toString()); });
Obtained result:
.test { @apply text-[red]; } .test:hover, .test:focus { @apply text-[blue]; }
Expected result:
.test { @apply text-[red] focus:text-[blue] hover:text-[blue]; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Setting multiple selectors in the same CSS rule returns an unexpected result: For example:
Obtained result:
Expected result:
The text was updated successfully, but these errors were encountered: