TypescaleBuilder
Decorators: |
|
Implements: |
|
Implementation of
for generating theme tokens relevant to Material typescale levels.
Notes
A typescale is a selection of font styles that can be used across an app, ensuring a flexible, yet consistent, style that accommodates a range of purposes. See
Each
generates 5 theme tokens. For a typescale level named "display-large", the generated tokens will be "display-large-font", "display-large-weight", "display-large-size", "display-large-line-height", "display-large-tracking".
See Also
for a less-verbose usage if the desired typescale levels are identical to the Material specificationsStandardTypescaleBuilder
Methods
build()implements
| ||||||
---|---|---|---|---|---|---|
No documentation has been provided. | ||||||
Presentation
| ||||||
Parameters
Returns |
buildTypescale() | ||||||
---|---|---|---|---|---|---|
No documentation has been provided. | ||||||
Presentation
| ||||||
Parameters
Returns |
Example usage
const font = 'Roboto, sans-serif';
export const APP_TYPESCALES: TypescaleConfig [] = [
{
font,
name: 'display-large',
weight: '400',
size: '57px',
lineHeight: '64px',
tracking: '-0.2px',
},
{
font,
name: 'display-medium',
weight: '400',
size: '45px',
lineHeight: '52px',
tracking: '0.0px',
},
...
];
provideTheme (
withThemeBuilder ("typescale", TypescaleBuilder , APP_TYPESCALES),
),