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
Crossfade border-radius of "%" and "px" units #1416
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 3b802f9:
|
@@ -17,6 +17,7 @@ export function pixelsToPercent(pixels: number, axis: Axis): number { | |||
export const correctBorderRadius: ScaleCorrectorDefinition = { | |||
correct: (latest, node) => { | |||
if (!node.target) return latest | |||
|
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 seems unnecessary
const canMix = | ||
followRadius === 0 || | ||
leadRadius === 0 || | ||
isPx(followRadius) === isPx(leadRadius) |
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'm confused why we're not adding percent.test(leadRadius) === percent.test(followRadius)
to this?
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.
But the test case seems to be still passing...
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 is essentially testing if they're different
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.
So if they're both false it's all good too
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.
Ah right! So in the purely hypothetical case that there would be a third string-based format, we would be fucked.
Let's add a comment about that then, because I think it's pretty confusing.
Fixes #1413