Skip to content
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

Configure CSS nesting correctly #3473

Merged
merged 1 commit into from
Feb 15, 2023
Merged

Configure CSS nesting correctly #3473

merged 1 commit into from
Feb 15, 2023

Conversation

dem4ron
Copy link
Member

@dem4ron dem4ron commented Feb 15, 2023

No description provided.

@@ -1,7 +1,7 @@
module.exports = {
plugins: [
require('postcss-import'),
require('tailwindcss/nesting'),
require('tailwindcss/nesting')(require('postcss-nesting')),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this line do?

Copy link
Member Author

@dem4ron dem4ron Feb 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

following the docs you'd need to write it in an object format like this:

// postcss.config.js
module.exports = {
  plugins: {
    'postcss-import': {},
    'tailwindcss/nesting': 'postcss-nesting',
    tailwindcss: {},
    autoprefixer: {},
  }
}

but as it was already configured in this commonjs format, this is just the analogue of the above. It invokes the required tailwindcss/nesting plugin with the required postcss-nesting plugin as an argument.

Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this remove the warning in the logs?

@dem4ron
Copy link
Member Author

dem4ron commented Feb 15, 2023

Does this remove the warning in the logs?

yes

@iHiD iHiD merged commit d88930e into main Feb 15, 2023
@iHiD iHiD deleted the nested-css-setup branch February 15, 2023 15:53
ErikSchierboom added a commit that referenced this pull request Feb 17, 2023
ErikSchierboom added a commit that referenced this pull request Feb 17, 2023
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.

3 participants