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 valid content values in dev #2279

Merged
merged 2 commits into from
Mar 16, 2021
Merged

Fix incorrectly throwing error on valid content values in dev #2279

merged 2 commits into from
Mar 16, 2021

Conversation

lucasweng
Copy link
Contributor

@lucasweng lucasweng commented Mar 8, 2021

What:
Fix incorrectly throwing error on valid content values in dev

Why:
This change allows using multiple valid content values like content: open-quote counter(chapter_counter); in dev. Per doc https://developer.mozilla.org/en-US/docs/Web/CSS/content, several values can be used simultaneously, except for normal, none and global values.

How:

  • Update contentValuePattern regex for the cases of multiple content values
  • Remove invalid regex pattern calc
  • Remove invalid content value counter in contentValues
let contentValuePattern = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/
let contentValues = ['normal', 'none', 'initial', 'inherit', 'unset']

Checklist:

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

* Remove invalid regex pattern `calc`

* Remove invalid content value `counter`

* Several content values can be used simultaneously, except for `normal`, `none` and global values
@changeset-bot
Copy link

changeset-bot bot commented Mar 8, 2021

🦋 Changeset detected

Latest commit: b20b5aa

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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 8, 2021

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 b20b5aa:

Sandbox Source
Emotion Configuration

@Andarist Andarist merged commit 830dd0e into emotion-js:master Mar 16, 2021
@github-actions github-actions bot mentioned this pull request Mar 16, 2021
@lucasweng lucasweng deleted the patch-1 branch March 16, 2021 17:48
@github-actions github-actions bot mentioned this pull request Apr 8, 2021
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