Skip to content

Commit

Permalink
[css-fonts-4] Keywords inside local() are an error, #8187
Browse files Browse the repository at this point in the history
  • Loading branch information
svgeesus committed Dec 5, 2023
1 parent 6cce777 commit 75e8082
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions css-fonts-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2708,14 +2708,20 @@ or font format.
within a larger family.
The name can optionally be enclosed in quotes.
If unquoted,
the unquoted font family name processing conventions apply;
the <a href="#family-name-syntax">unquoted font family name processing conventions</a> apply;
in other words,
the name must be a sequence of identifiers
separated by <a href="https://www.w3.org/TR/css3-syntax/#whitespace">whitespace</a>
which is converted to a string
by joining the identifiers together
separated by a single space.
separated by a single space;
and thus,
<a>CSS-wide keywords</a> such as ''inherit'', and
<<generic-family>> keywords such as ''serif''
are not allowed inside <code>local()</code>.

<pre>

<pre class="lang-css">
/* regular face of Gentium */
@font-face {
font-family: MyGentium;
Expand All @@ -2724,6 +2730,17 @@ or font format.
}
</pre>

<div class="invalid example">
For example, this use of <code>local()</code> would be an error:

<pre class="lang-css">
@font-face {
font-family: foo;
src: local(inherit);
}
</pre>
</div>

For OpenType and TrueType fonts,
this string is used to match only the Postscript name
or the full font name
Expand Down

0 comments on commit 75e8082

Please sign in to comment.