Re: [csswg-drafts] [css-om] Serialization of font-family names: quoted string vs keyword (#5846)

The CSS Working Group just discussed `[css-om] Serialization of font-family names: quoted string vs keyword`, and agreed to the following:

* `RESOLVED: option 2 for both specified and computed value, if that's web compatible`

<details><summary>The full IRC log of that discussion</summary>
&lt;ydaniv> fantasai: this is about serializing font-family property and whether value should be quoted or not<br>
&lt;ydaniv> ... we can add kind of rule to say whether we quote or not<br>
&lt;ydaniv> ... if it matches keywords then you don't need to<br>
&lt;ydaniv> ... if it's quoted you can serialize without escapes<br>
&lt;emilio> q+<br>
&lt;astearns> ack dbaron<br>
&lt;emilio> FWIW what Firefox is doing is not _quite_ just doing what the author did: https://searchfox.org/firefox-main/rev/d6dfd9f8cd9717b03750cded8980ef61678fbc8b/servo/components/style/values/computed/font.rs#702-710<br>
&lt;ydaniv> ... if you can serialize without escapes then serialize as is<br>
&lt;emilio> +1 for both<br>
&lt;ydaniv> astearns: is this would be the pattern  for the computed value?<br>
&lt;astearns> ack emilio<br>
&lt;ydaniv> fantasai: yes<br>
&lt;ydaniv> emilio: Gecko is not doing exactly what's specified<br>
&lt;ydaniv> ... if you have keywords we quote anyway<br>
&lt;ydaniv> ... ok with making something conditional<br>
&lt;ydaniv> astearns: given it's likely we don't have browsers' interop...<br>
&lt;ydaniv> fantasai: I remember writing tests for this<br>
&lt;ydaniv> fantasai: quoted if it can't be serialized without quotes<br>
&lt;TabAtkins> serialize unquoted if doable without escapes; otherwise quote<br>
&lt;fantasai> s/quotes/escapes/<br>
&lt;ydaniv> PROPOSED RESOLUTION: serialize unquoted if doable without escapes; otherwise quote<br>
&lt;emilio> q+<br>
&lt;ydaniv> astearns: this is for both computed and specified values<br>
&lt;astearns> ack emilio<br>
&lt;ydaniv> emilio: one potential issue is it's not only about escapes, also need to check font-family and CSS-wide keywords<br>
&lt;ydaniv> TabAtkins: good clarification<br>
&lt;fantasai> https://github.com/w3c/csswg-drafts/issues/5846#issuecomment-3416392705<br>
&lt;fantasai> Quote if it matches an existing keyword (already required per spec).<br>
&lt;fantasai> Quote if it cannot be serialized as a keyword without escapes, i.e.:<br>
&lt;fantasai> contains non-alphanumeric ASCII.<br>
&lt;fantasai> contains a word that begins with a number.<br>
&lt;fantasai> Otherwise serialize as space-separated idents.<br>
&lt;ydaniv> emilio: you need to match it with bunch of strings that are now special<br>
&lt;ydaniv> ... some algo that you can do to check, and go back and look at all the keywords, it's a bit unfortunate<br>
&lt;ydaniv> ... I guess we need to escape certain keywords<br>
&lt;ydaniv> fantasai: they have to be quoted<br>
&lt;ydaniv> emilio: is there a case where you need to hard code the special cases?<br>
&lt;ydaniv> fantasai: If you keep the quotedness of all is that you need a special state<br>
&lt;ydaniv> emilio: that's what gecko does<br>
&lt;ydaniv> fantasai: no strong opinion on this, but we'll need to change value<br>
&lt;ydaniv> emilio: ok whichever way we're go, but think keep the quotedness is simpler<br>
&lt;ydaniv> fantasai: Is it easier to implement? or should we have a dict of words to check?<br>
&lt;ydaniv> emilio: [listing cases]<br>
&lt;ydaniv> astearns: so are going to allow quoted things where we can?<br>
&lt;ydaniv> emilio: would prefer to have it if there's something similar already<br>
&lt;ydaniv> astearns: so should we take it back and do impl. research?<br>
&lt;ydaniv> ... or take a resolution to unquote where we can?<br>
&lt;ydaniv> emilio: ok taking the resolution if others are doing similar stuff<br>
&lt;ydaniv> PROPOSED RESOLUTION: option 2 for both specified and computed value, if that's web compatible<br>
&lt;ydaniv> astearns: objections?<br>
&lt;ydaniv> RESOLVED: option 2 for both specified and computed value, if that's web compatible<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5846#issuecomment-3885672626 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 11 February 2026 16:50:30 UTC