Skip to content

Conversation

@lubomirblazekcz
Copy link
Contributor

PostCSS nesting added some options that can be configured eg.
https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting#noispseudoselector

Current implementation of Tailwind Nesting doesn't pass the options, becuase the typeof of the plugin is object with options, not function. This fixes it.

Example PostCSS Vite configuration

import postcssImport from 'postcss-import';
import postcssNesting from 'postcss-nesting';
import tailwindcss from 'tailwindcss'
import tailwindcssNesting from 'tailwindcss/nesting'
import autoprefixer from 'autoprefixer'

export default {
  css: {
    postcss: {
      plugins: [postcssImport, tailwindcssNesting(postcssNesting({
        noIsPseudoSelector: true
      })), tailwindcss, autoprefixer]
    }
}

@lubomirblazekcz lubomirblazekcz changed the title fix: options for nesting / nested plugins Fix options for nesting / nested plugins Jan 11, 2022
@RobinMalfait RobinMalfait self-assigned this Jan 14, 2022
@RobinMalfait
Copy link
Member

Hey! Thank you for your PR!
Much appreciated! 🙏

@RobinMalfait RobinMalfait changed the title Fix options for nesting / nested plugins Ensure nesting plugins can receive options Jan 14, 2022
@RobinMalfait RobinMalfait merged commit 8293c2d into tailwindlabs:master Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants