Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Allow font-family to be customised using CSS variables #5003

@robcaldecottvelo

Description

@robcaldecottvelo

Currently there is no way to override the font-family for some components (like button) without using:

  • Custom CSS rules.
  • The SASS $mdc-theme-font-family variable.

However, we can update the various theme colours using CSS variables which is simple and allows for easy custom theming (see the RMWC web site for an example.)

It would be great if the main theme font-family could also be overridden using a CSS variable in the same way as the various colours, e.g.:

:root {
  --mdc-theme-primary: #6200ee;
  --mdc-theme-secondary: #018786;
  --mdc-theme-font-family: "Custom Font Name"
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions