-
Notifications
You must be signed in to change notification settings - Fork 777
feat(tailwind): extract pseudo classes to stylesheet #1864
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
feat(tailwind): extract pseudo classes to stylesheet #1864
Conversation
🦋 Changeset detectedLatest commit: 64bdc96 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@Sjoertjuh is attempting to deploy a commit to the resend Team on Vercel. A member of the Team first needs to authorize it. |
9a66e12
to
fe2573d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, really nice! We planned on having this at some point, so this is really helpful!
One thing that still needs an adjustment is when the user has a media query with pseudo selectors as well, I also added in a change in the tests that currently fails to ensure that this works.
Another thing I'd like improvement is the duplicated code between the sanitization of media queries and of the pseudo selectors, since they seem to be mostly the same.
I indeed forgot that you could mix media queries with pseudo classes, so I added that. Also the change in the test was not completely correct, so that is updated as well. |
9b6098c
to
ee6d8fb
Compare
b466e15
to
aef20d1
Compare
I extracted some common logic from the two functions. Let me know if this is alright! |
81c08e3
to
301f54b
Compare
Hey @gabrielmfern, whenever you get a chance, would love to hear your thoughts on this PR. Thanks! |
3f49802
to
bfc09bf
Compare
packages/tailwind/src/utils/css/pseudo-classes/sanitize-pseudo-classes.ts
Outdated
Show resolved
Hide resolved
Sorry for taking so long to review this again @Sjoertjuh. Added a comment on the changes you made, just a heads up, when updating this branch to the upstream |
bfc09bf
to
72efb50
Compare
98cabbc
to
07e33b1
Compare
@gabrielmfern No problem, I'm not in a hurry. I did a rebase and refactored the functions into a single function, which I think looks pretty good now. Let me know if you need anything else done. |
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Co-authored-by: gabriel miranda <[email protected]>
Solves the following discussion: #1338
This extracts pseudo classes like
:hover
to the stylesheet.