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: font-family: revert/revert-layer cannot remove quotation marks #121

Merged
merged 1 commit into from Mar 25, 2022

Conversation

yisibl
Copy link
Contributor

@yisibl yisibl commented Mar 24, 2022

CSS wide keywords are confusingly defined(see w3c/csswg-drafts#7170), we left out revert and revert-layer, and we can't remove the quotes when these keywords are present.

Improvement #120

@yisibl
Copy link
Contributor Author

yisibl commented Mar 24, 2022

font-family: default is an invalid value, do we need to do special handling?

image

@devongovett
Copy link
Member

hmm, the spec says that unquoted family names parse as <custom-ident>, which reserves default: https://drafts.csswg.org/css-fonts/#family-name-syntax

Copy link
Member

@devongovett devongovett left a comment

Choose a reason for hiding this comment

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

Thanks!

@devongovett devongovett merged commit e305244 into parcel-bundler:master Mar 25, 2022
@yisibl yisibl deleted the fix-font-family branch March 27, 2022 13:41
@yisibl
Copy link
Contributor Author

yisibl commented Mar 27, 2022

I've made similar improvements in esbuild evanw/esbuild#2135

@yisibl
Copy link
Contributor Author

yisibl commented Mar 27, 2022

hmm, the spec says that unquoted family names parse as <custom-ident>, which reserves default: https://drafts.csswg.org/css-fonts/#family-name-syntax

https://www.w3.org/TR/css-values-4/#ref-for-css-wide-keywords

The CSS-wide keywords are not valid <custom-ident>s. The default keyword is reserved and is also not a valid <custom-ident>

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