Skip to content

[css-fonts] Clarification on behaviour when modifying @font-face rules #3542

Description

@keithclark

I'd like some clarification on how fonts should be handled if the @font-face block that describes them is modified after the document has loaded.

Using any of the methods below, my expectation (which could be wrong) is that the browser should stop rendering text using a custom font:

  • Invalidating the @font-face rule by renaming it to something like @-disabled-font-face
  • Changing the font-family value in a @font-face rule but not updating the font-family elsewhere
  • Changing the src value in a @font-face rule
  • Disabling a stylesheet containing an @font-face rule
  • Deleting a stylesheet containing an @font-face rule

However, Safari, Chrome and Firefox all continue to render text using the font. Is this the expected behaviour? If so, could somebody point me to the part of the spec that defines it?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions