properly handle keywords within src descriptor of @font-face rules

NEW
Unassigned

Status

()

Core
CSS Parsing and Computation
P4
minor
3 years ago
3 years ago

People

(Reporter: jtd, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
Local fonts within @font-face rules:

  @font-face {
    font-family: bongo;
    src: local(inherit), url(bongo.ttf);
  }

Like the font-family and font properties, the unquoted name within local() should probably follow the rules for unquoted font family names.  Unquoted names are a sequence of space separated idents, keywords excluded.

  font-family: bongo, inherit; /* invalid */

Authors need to use quotes in this case:

  font-family: bongo, "inherit"; /* valid */

The current parsing of src: local() uses ParseOneFamily, it should probably use ParseFamily instead, then verify that the result is a single non-generic and non-keyword name.
You need to log in before you can comment on or make changes to this bug.