-
Notifications
You must be signed in to change notification settings - Fork 187
group-hover classes are not removed #20
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
Comments
Possible to open a PR with a failing test? Can try to fiddle with rubular.com to help sift the regex tweaks needed. |
Sure! Will open a failing test PR tomorrow |
jonathanhefner
added a commit
to jonathanhefner/tailwindcss-rails
that referenced
this issue
Feb 19, 2021
This rewrite accomplishes a few things: * Fixes rails#20. Closes rails#22. * Purges selectors that aren't on the same line as their block brace: *Before* ```css .sm\:aspect-w-1, /* ... */ .sm\:aspect-w-15 > *, @media (prefers-color-scheme: dark) { } ``` * Purges empty "at rule" blocks (e.g. `@media` blocks). * Purges comments, except within property values. * Adds support for nested selector blocks, to prepare for the future. For example, Tailwind has many `.group:hover .group-hover\:X` rules that could be written as `.group:hover { .group-hover\:X { ... } }`. * Improves performance: *Before* ```bash $ bin/test -n test_basic_purge Finished in 2.307380s, 0.4334 runs/s, 3.0337 assertions/s. 1 runs, 7 assertions, 0 failures, 0 errors, 0 skips ``` *After* ```bash $ bin/test -n test_basic_purge Finished in 1.824162s, 0.5482 runs/s, 3.8374 assertions/s. 1 runs, 7 assertions, 0 failures, 0 errors, 0 skips ```
jonathanhefner
added a commit
to jonathanhefner/tailwindcss-rails
that referenced
this issue
Feb 19, 2021
This rewrite accomplishes a few things: * Fixes rails#20. Closes rails#22. * Purges selectors that aren't on the same line as their block brace: **Before** ```css .sm\:aspect-w-1, /* ... */ .sm\:aspect-w-15 > *, @media (prefers-color-scheme: dark) { } ``` * Purges empty "at rule" blocks (e.g. empty `@media` blocks). * Purges comments, except within property values. * Adds support for nested selector blocks, to prepare for the future. For example, Tailwind has many `.group:hover .group-hover\:X` rules that could be written as `.group:hover { .group-hover\:X { ... } }`. * Improves performance: **Before** ```bash $ bin/test -n test_basic_purge Finished in 2.307380s, 0.4334 runs/s, 3.0337 assertions/s. 1 runs, 7 assertions, 0 failures, 0 errors, 0 skips ``` **After** ```bash $ bin/test -n test_basic_purge Finished in 1.824162s, 0.5482 runs/s, 3.8374 assertions/s. 1 runs, 7 assertions, 0 failures, 0 errors, 0 skips ```
jonathanhefner
added a commit
to jonathanhefner/tailwindcss-rails
that referenced
this issue
Feb 19, 2021
This rewrite accomplishes a few things: * Fixes rails#20. Closes rails#22. * Purges selectors that aren't on the same line as their block brace: **Before** ```css .sm\:aspect-w-1, /* ... */ .sm\:aspect-w-15 > *, @media (prefers-color-scheme: dark) { } ``` * Purges empty "at rule" blocks (e.g. empty `@media` blocks). * Purges comments, except within property values. * Adds support for nested selector blocks, to prepare for the future. For example, Tailwind has many `.group:hover .group-hover\:X` rules that could be written as `.group:hover { .group-hover\:X { ... } }`. * Improves performance: **Before** ```bash $ bin/test -n test_basic_purge Finished in 2.307380s, 0.4334 runs/s, 3.0337 assertions/s. 1 runs, 7 assertions, 0 failures, 0 errors, 0 skips ``` **After** ```bash $ bin/test -n test_basic_purge Finished in 1.824162s, 0.5482 runs/s, 3.8374 assertions/s. 1 runs, 7 assertions, 0 failures, 0 errors, 0 skips ```
Merged
jonathanhefner
added a commit
to jonathanhefner/tailwindcss-rails
that referenced
this issue
Feb 22, 2021
This rewrite accomplishes a few things: * Fixes rails#20. Closes rails#22. * Purges selectors that aren't on the same line as their block brace: **Before** ```css .sm\:aspect-w-1, /* ... */ .sm\:aspect-w-15 > *, @media (prefers-color-scheme: dark) { } ``` * Purges empty "at rule" blocks (e.g. empty `@media` blocks). * Purges comments, except within property values. * Adds support for nested selector blocks, to prepare for the future. For example, Tailwind has many `.group:hover .group-hover\:X` rules that could be written as `.group:hover { .group-hover\:X { ... } }`. * Improves performance: **Before** ```bash $ bin/test -n test_basic_purge Finished in 2.307380s, 0.4334 runs/s, 3.0337 assertions/s. 1 runs, 7 assertions, 0 failures, 0 errors, 0 skips ``` **After** ```bash $ bin/test -n test_basic_purge Finished in 1.824162s, 0.5482 runs/s, 3.8374 assertions/s. 1 runs, 7 assertions, 0 failures, 0 errors, 0 skips ```
jonathanhefner
added a commit
to jonathanhefner/tailwindcss-rails
that referenced
this issue
Feb 22, 2021
This rewrite accomplishes a few things: * Fixes rails#20. Closes rails#22. * Purges selectors that aren't on the same line as their block brace: **Before** ```css .sm\:aspect-w-1, /* ... */ .sm\:aspect-w-15 > *, @media (prefers-color-scheme: dark) { } ``` * Purges empty "at rule" blocks (e.g. empty `@media` blocks). * Purges comments, except within property values. * Adds support for nested selector blocks, to prepare for the future. For example, Tailwind has many `.group:hover .group-hover\:X` rules that could be written as `.group:hover { .group-hover\:X { ... } }`. * Improves performance: **Before** ```bash $ bin/test -n test_basic_purge Finished in 2.307380s, 0.4334 runs/s, 3.0337 assertions/s. 1 runs, 7 assertions, 0 failures, 0 errors, 0 skips ``` **After** ```bash $ bin/test -n test_basic_purge Finished in 1.824162s, 0.5482 runs/s, 3.8374 assertions/s. 1 runs, 7 assertions, 0 failures, 0 errors, 0 skips ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
After 8af7bfc group-hover classes,
group-hover:text-gray-900
for example, are not purged.This adds a substantial amount of classes to the outputted css.
Unfortunately my regex skills are not strong enough to fix it.
(Originally created a comment but a new issue is probably more visible to people. )
The text was updated successfully, but these errors were encountered: