-
Notifications
You must be signed in to change notification settings - Fork 182
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
Correct handling of <family-name>
in font-family
#120
Labels
bug
Something isn't working
Comments
Fixed by facbffd |
There are more case test failures: https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#valid_family_names Input.foo {
font-family: "Goudy Bookletter 1911", sans-serif;
font-family: "test@foo", sans-serif;
font-family: "#POUND", sans-serif;
font-family: "Hawaii 5-0", sans-serif;
}
.bar {
font-family: "Red/Black", sans-serif;
} Output.foo{font-family:"Hawaii 5-0",sans-serif}
.bar{font-family:Red\/Black,sans-serif} Expected.foo{font-family:"Goudy Bookletter 1911",sans-serif;font-family:"test@foo",sans-serif;font-family:"#POUND",sans-serif;font-family:"Hawaii 5-0",sans-serif}
.bar{font-family:"Red/Black",sans-serif} |
What's invalid in that output? Looks like the identifier is properly escaped? |
@devongovett I added the expected results. |
mischnic
pushed a commit
to mischnic/rust-css-transformer
that referenced
this issue
Apr 9, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Input
Output
Expected
font-family: sans-serif
means that a genericsans-serif
font family will be used, whilefont-family: 'sans-serif'
(with quotes) refers to an actual font that goes by the name ofsans-serif
.CSS Spec
The full CSS-wide keyword(common-keywords) and
<generic-family>
in the current specification include:CSS-wide keyword
https://www.w3.org/TR/css-values-4/#common-keywords
<generic-family>
https://www.w3.org/TR/css-fonts-4/#generic-font-families
Here's a lint tool: https://mothereff.in/font-family
The text was updated successfully, but these errors were encountered: