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

handle complex expressions inside CSS prop object syntax #359

Merged
merged 2 commits into from Nov 22, 2021

Conversation

quantizor
Copy link
Collaborator

fixes #352

@quantizor quantizor merged commit b594e23 into main Nov 22, 2021
@quantizor quantizor deleted the 352/object-css-prop branch November 22, 2021 02:31
@klarstrup
Copy link
Contributor

One of these changes broke my thing that isn't using the object syntax, I hope to find out more later but just an immediate FYI

@quantizor
Copy link
Collaborator Author

@klarstrup must be something to do with this change: https://github.com/styled-components/babel-plugin-styled-components/pull/359/files#diff-ef6a6ffba3d725918f184d76241892f9e7ac878aa3891cce860feea7648794b3L125

If you can come up with an example of the syntax that triggers the error, would appreciate it.

@klarstrup
Copy link
Contributor

You'll have to excuse the cobbled together repro but here you see the problem at a glance:

v2.0.1
image

v2.0.0
image

@klarstrup
Copy link
Contributor

So in short there's an issue of spread ...props disappearing when combined with css within a render prop (but this also happens if one copies out the render prop function into for example a useMemo)

@klarstrup
Copy link
Contributor

fix is in btw #361

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Usage of css prop broken in 1.13.2
2 participants