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

Add tailwindcss/nesting plugin #4673

Merged
merged 10 commits into from Jun 17, 2021
Merged

Add tailwindcss/nesting plugin #4673

merged 10 commits into from Jun 17, 2021

Conversation

@RobinMalfait
Copy link
Contributor

@RobinMalfait RobinMalfait commented Jun 17, 2021

This PR will allow users to use tailwindcss/nesting as a nesting plugin that fixes some of the quirks you run into when using Tailwind with postcss-nested or postcss-nesting out of the box.

Also improves our compat script by scanning all .postcss7.* files and swapping them, instead of handling just a few hard-coded files.

RobinMalfait and others added 9 commits Jun 17, 2021
This will allow us to keep the plugins in their dedicated folders +
tests + postcss7 compatibility files. However, when we copy over the
plugins to the root. For example `plugins/nesting/` -> `nesting/` we
skip files like `.test.js` and `.postcss7.js`.
We will use a glob so that we can move all *.postcss7.* files to just
*.* likewise we will also backup to *.* to *.postcss8.* for restoring
purposes.

Concrete example:

- Current state:
  - index.js            // PostCSS 8 implementation
  - index.postcss7.js   // PostCSS 7 implementation

- Run "compat"
  - index.js            // PostCSS 7 implementation
  - index.postcss7.js   // PostCSS 7 implementation
  - index.postcss8.js   // PostCSS 8 implementation (Backup of original)

- Run "compat:restore"
  - index.js            // PostCSS 8 implementation
  - index.postcss7.js   // PostCSS 7 implementation
  - X index.postcss8.js // PostCSS 8 implementation (Removed)
@RobinMalfait RobinMalfait force-pushed the add-nesting-plugin branch from 8812642 to 6a4d1a2 Jun 17, 2021
@RobinMalfait RobinMalfait force-pushed the add-nesting-plugin branch from 91c8f68 to dd02ae1 Jun 17, 2021
@adamwathan adamwathan merged commit f63b453 into master Jun 17, 2021
3 checks passed
3 checks passed
@github-actions
build (12)
Details
@github-actions
build (14)
Details
@github-actions
build (16)
Details
@adamwathan adamwathan deleted the add-nesting-plugin branch Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants