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

Fix incorrectly throwing error on the gradient content values in dev #2264

Merged
merged 1 commit into from Feb 22, 2021
Merged

Fix incorrectly throwing error on the gradient content values in dev #2264

merged 1 commit into from Feb 22, 2021

Conversation

lucasweng
Copy link
Contributor

What:
Incorrectly throwing error on gradient content values in dev

Why:
This change allows using gradient content values in dev. Per doc https://developer.mozilla.org/en-US/docs/Web/CSS/content#values, <gradient> is a valid data type for the content property.

How:
Update contentValuePattern regex to allow valid gradient function types https://developer.mozilla.org/en-US/docs/Web/CSS/gradient#syntax

let contentValuePattern = /(attr|calc|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(/

Checklist:

  • Documentation - N/A
  • Tests
  • Code complete
  • Changeset

@changeset-bot
Copy link

changeset-bot bot commented Feb 22, 2021

🦋 Changeset detected

Latest commit: 80981a2

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

This PR includes changesets to release 1 package
Name Type
@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

@lucasweng lucasweng changed the title Fix incorrectly throwing error on the gradient content values Fix incorrectly throwing error on the gradient content values in dev Feb 22, 2021
@codesandbox-ci
Copy link

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 80981a2:

Sandbox Source
Emotion Configuration

Copy link
Member

@emmatown emmatown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@emmatown emmatown merged commit 418daad into emotion-js:master Feb 22, 2021
@github-actions github-actions bot mentioned this pull request Feb 22, 2021
@lucasweng lucasweng deleted the patch-1 branch February 22, 2021 23:52
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.

None yet

2 participants