[cssom-1] font-family descriptor should not be serialized if not present, fix #13323#13847
Merged
Conversation
emilio
approved these changes
Apr 28, 2026
emilio
left a comment
Collaborator
There was a problem hiding this comment.
Looks good but it reads a bit weird to me? Maybe it should be reworded in terms of a temporary string and appending or something. But seems fine either way :)
AtkinsSJ
reviewed
Apr 30, 2026
Comment on lines
1901
to
+1904
| <li>The string "<code>@font-face {</code>", followed by a single SPACE (U+0020).</li> | ||
| <li>The string "<code>font-family:</code>", followed by a single SPACE (U+0020).</li> | ||
| <li>The result of performing <a>serialize a string</a> on the rule’s font family name.</li> | ||
| <li>The string "<code>;</code>", i.e., SEMICOLON (U+003B). | ||
| <li>If the '@font-face/font-family' descriptor is present: | ||
| <ol> | ||
| <li>The string "<code>font-family:</code>", followed by a single SPACE (U+0020).</li> |
Contributor
There was a problem hiding this comment.
I'm late, but I think the space added in step 1 also needs changing, to be added in step 2.1 instead. Otherwise, if there is no font-family, then step 3.1 below will mean there are two spaces between the { and the first descriptor name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[cssom-1] Fixes #13323