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

Conversation

@una
Copy link

@una una commented Dec 20, 2019

See #5349

This would result in an output of:

font-family: var(--mdc-typography-font-family), Roboto, sans-serif; instead of font-family: Roboto, sans-serif; for each base instance, enabling overrides with custom properties. Unsupported browsers will ignore the first font declaration for the second.

This would enable base styling overrides with custom properties:

root: {
  --mdc-typography-font-family: "fontName", serif;
}

And per-class overrides with custom properties:

.mdc-typography--headline2 {
  --mdc-typography-font-family: "myOtherFont", serif;
}

@una una changed the title Enable custom property styling for base typography feat(custom-props/base-type) Enable custom property styling for base typography Dec 20, 2019
@una una changed the title feat(custom-props/base-type) Enable custom property styling for base typography feat(custom-props) Enable custom property styling for base typography Dec 20, 2019
@abhiomkar abhiomkar changed the title feat(custom-props) Enable custom property styling for base typography feat: Enable custom property styling for base typography Dec 20, 2019
--mdc-typography-font-family: "Roboto", sans-serif;
}

$mdc-typography-font-family: var(--mdc-typography-font-family), unquote("Roboto, sans-serif") !default;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to apply this CSS custom property in mdc-typography-base() mixin?

@abhiomkar
Copy link
Collaborator

Assigning this to @asyncliz since she is working on custom property support for Typography.

@asyncliz
Copy link
Contributor

Closing in favor of #5618

@asyncliz asyncliz closed this Feb 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants