-
Notifications
You must be signed in to change notification settings - Fork 4
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 :global() to inline css classes automatically #68
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
CodSpeed Performance ReportMerging #68 will not alter performanceComparing Summary
|
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.
Thank you for the PR :)
Could you add some more tests for the following cases where it should replace it:
import { styled, keyframes } from "next-yak";
const Component = styled.a\`
.any-class:hover {
color: red;
}
\`;
import { styled, keyframes } from "next-yak";
const Component = styled.a\`
:where(.any-class) {
color: red;
}
\`;
And a case where it shouldn't replace it:
import { styled, keyframes } from "next-yak";
const Link = styled.a\`
color: palevioletred;
\`
const Icon = styled.svg\`
\${Link} & {
color: red;
}
\`
).toMatchInlineSnapshot(` | ||
".headline_0 { | ||
color: red; | ||
:global(dark-mode) { |
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.
this should be :global(.dark-mode)
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.
I think it doesn't handle all cases yet, but feel free to change and rerequest a review once my points are fixed
I'll close this for now because of the conflicts - feel free to reopen :) |
fixes #53