Skip to content

Conversation

@arturmuller
Copy link
Contributor

What: The var() css function is now allowed in the content property.

Why: It is valid (and sometimes very useful!) to use CSS variables in the content property. Currently, Emotion throws and error (in development) when var is encountered, making its use impossible.

How: var has been added to contentValuePattern regex.

Checklist:

  • Documentation N/A
  • Tests
  • Code complete
  • Changeset N/A (I am not sure if this should release a new package?)

@changeset-bot
Copy link

changeset-bot bot commented Mar 30, 2022

🦋 Changeset detected

Latest commit: 8d40db7

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

This PR includes changesets to release 3 packages
Name Type
@emotion/css Patch
@emotion/react Patch
@emotion/serialize 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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 30, 2022

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 8d40db7:

Sandbox Source
Emotion Configuration

@Andarist
Copy link
Member

Could you just prepare a simple jsfiddle or something that would showcase how exactly you are using this with plain CSS?

@codecov
Copy link

codecov bot commented Mar 30, 2022

Codecov Report

Merging #2700 (e8c408f) into main (2d3d7dd) will not change coverage.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
packages/serialize/src/index.js 100.00% <100.00%> (ø)

@arturmuller
Copy link
Contributor Author

@Andarist Sure thing. Here's a CodePen: https://codepen.io/artmllr/pen/zYpErqJ

@Andarist Andarist merged commit d935762 into emotion-js:main Apr 5, 2022
@github-actions github-actions bot mentioned this pull request Apr 5, 2022
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.

2 participants