atlassian-labs / compiled

A familiar and performant compile time CSS-in-JS library for React.
https://compiledcssinjs.com
Apache License 2.0
1.98k stars 68 forks source link

Fix handling of CSS `content` property #1658

Closed dddlr closed 4 months ago

dddlr commented 4 months ago

Fixes #1650, where quotes are incorrectly added around the value in situations like content: url(...) and content: counter(...)

Thanks to @mattcompiles for suggesting this approach to fixing the bug.

Based on https://github.com/vanilla-extract-css/vanilla-extract/blob/a623c1c65a543afcedb9feb30a7fe20452b99a95/packages/css/src/transformCss.ts#L266

For the curious:


changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: 7dabece2823a2150e247be7fd8902fb44797f393

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------------------- | ----- | | @compiled/babel-plugin | Patch |

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

mattcompiles commented 4 months ago

Nice one @dddlr I'd consider porting the test across here as well. We based most of ours off the examples on MDN.