Skip to content

CSS ui-* font family #1050

@nileshprajapati

Description

@nileshprajapati

Description

The CSS ui-* font family is used for the variants of the system’s user interface, allowing developers to lean on the platform’s native UI fonts (serif, sans-serif, monospace, rounded) so UI typography integrates with the operating system and feels native while remaining robust across browsers that don’t yet support the ui-* generic keywords.

  • ui-serif
  • ui-sans-serif
  • ui-monospace
  • ui-rounded
  • math
.serif {
  font-family: ui-serif;
}

.sansserif {
  font-family: ui-sans-serif;
}

.monospace {
  font-family: ui-monospace;
}

. rounded {
  font-family: ui-rounded;
}

.math {
  font-family: math;
}

https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#browser_compatibility

Specification

https://www.w3.org/TR/css-fonts-4/#generic-family-name-syntax

web-feature

font-family

Test Links

No response

Additional Signals

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions