-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix composition of styles without a final semicolon in a declaration block #1560
Conversation
🦋 Changeset is good to goLatest commit: 0540a6b We got this. 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 |
Codecov Report
|
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.
Thanks!!
Hi @Andarist Could it be that this PR got too aggressive and is adding too many semi-colons? The dependency upgrade broke a lot of our snapshot tests by adding extra unnecessary ones, like this: (see related code: <Modal
containerStyle={css({
width: WIDTH,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
textAlign: 'center',
})}
titleText={title}
onExit={routerPush({ url })}
>
Content
</Modal> It seems to be happening only in components where we pass I tried doing a repro in CodeSandbox but they don't support |
Yes - this is intentionally aggressive. Detecting if we actually need to add semi would be more costful than it is worth it - especially that an extra semi doesn't affect generated styles. What you see is an opaque object (is not expected to be stable/inspectable) and you really shouldn't test against it - you can use Technically after this PR got merged in maybe we could tweak the logic introduced in #1554 but it's a microoptimization at best. I'll look into it - but it's not a high priority right now. |
Thanks for your reply @Andarist ; I understand the reasoning. FWIW we already use We'll update our snapshots. |
fixes ##1284
It's a low-cost fix for what is a valid CSS ¯\(ツ)/¯