Skip to content

tailwindcss/nesting used with postcss-nesting breaks some postcss plugins #7234

@lubomirblazekcz

Description

@lubomirblazekcz

What version of Tailwind CSS are you using?

v3.0.17

What build tool (or framework if it abstracts the build tool) are you using?

[email protected]

What version of Node.js are you using?

For example: v17.1.0

What operating system are you using?

MacOS

Describe your issue

tailwindcss/nesting used with postcss-nesting breaks some postcss plugins. In this example vite config cssHasPseudo is not working. Also another plugin that is not working is postcss-mixins

import tailwindcss from 'tailwindcss'
import tailwindcssNesting from 'tailwindcss/nesting'
import autoprefixer from 'autoprefixer'
import postcssImport from 'postcss-import'
import postcssNesting from 'postcss-nesting'
import cssHasPseudo from 'css-has-pseudo'
import postcssCustomMedia from 'postcss-custom-media'

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions