Update TextTheme with the M3 Typography tokens (#153131)
This PR adds a new table with[ Material 3 typography tokens](https://m3.material.io/styles/typography/type-scale-tokens). Issue: https://github.com/flutter/flutter/issues/148429
This commit is contained in:
parent
73c9e4e578
commit
81ee230f49
@ -35,6 +35,28 @@ import 'typography.dart';
|
|||||||
/// current (2021) version of the specification
|
/// current (2021) version of the specification
|
||||||
/// ([https://m3.material.io/styles/typography/tokens](https://m3.material.io/styles/typography/tokens)).
|
/// ([https://m3.material.io/styles/typography/tokens](https://m3.material.io/styles/typography/tokens)).
|
||||||
///
|
///
|
||||||
|
/// The **2021** spec has fifteen text styles:
|
||||||
|
///
|
||||||
|
/// | NAME | SIZE | HEIGHT | WEIGHT | SPACING | |
|
||||||
|
/// |----------------|------|---------|---------|----------|-------------|
|
||||||
|
/// | displayLarge | 57.0 | 64.0 | regular | -0.25 | |
|
||||||
|
/// | displayMedium | 45.0 | 52.0 | regular | 0.0 | |
|
||||||
|
/// | displaySmall | 36.0 | 44.0 | regular | 0.0 | |
|
||||||
|
/// | headlineLarge | 32.0 | 40.0 | regular | 0.0 | |
|
||||||
|
/// | headlineMedium | 28.0 | 36.0 | regular | 0.0 | |
|
||||||
|
/// | headlineSmall | 24.0 | 32.0 | regular | 0.0 | |
|
||||||
|
/// | titleLarge | 22.0 | 28.0 | regular | 0.0 | |
|
||||||
|
/// | titleMedium | 16.0 | 24.0 | medium | 0.15 | |
|
||||||
|
/// | titleSmall | 14.0 | 20.0 | medium | 0.1 | |
|
||||||
|
/// | bodyLarge | 16.0 | 24.0 | regular | 0.5 | |
|
||||||
|
/// | bodyMedium | 14.0 | 20.0 | regular | 0.25 | |
|
||||||
|
/// | bodySmall | 12.0 | 16.0 | regular | 0.4 | |
|
||||||
|
/// | labelLarge | 14.0 | 20.0 | medium | 0.1 | |
|
||||||
|
/// | labelMedium | 12.0 | 16.0 | medium | 0.5 | |
|
||||||
|
/// | labelSmall | 11.0 | 16.0 | medium | 0.5 | |
|
||||||
|
///
|
||||||
|
/// ...where "regular" is `FontWeight.w400` and "medium" is `FontWeight.w500`.
|
||||||
|
///
|
||||||
/// The names of the 2018 TextTheme properties match this table from the
|
/// The names of the 2018 TextTheme properties match this table from the
|
||||||
/// [Material Design spec](https://material.io/design/typography/the-type-system.html#type-scale)
|
/// [Material Design spec](https://material.io/design/typography/the-type-system.html#type-scale)
|
||||||
/// with a few exceptions: the styles called H1-H6 in the spec are
|
/// with a few exceptions: the styles called H1-H6 in the spec are
|
||||||
@ -42,7 +64,7 @@ import 'typography.dart';
|
|||||||
/// bodyLarge and bodyMedium, caption is now bodySmall, button is labelLarge,
|
/// bodyLarge and bodyMedium, caption is now bodySmall, button is labelLarge,
|
||||||
/// and overline is now labelSmall.
|
/// and overline is now labelSmall.
|
||||||
///
|
///
|
||||||
/// The 2018 spec has thirteen text styles:
|
/// The **2018** spec has thirteen text styles:
|
||||||
///
|
///
|
||||||
/// | NAME | SIZE | WEIGHT | SPACING | |
|
/// | NAME | SIZE | WEIGHT | SPACING | |
|
||||||
/// |----------------|------|---------|----------|-------------|
|
/// |----------------|------|---------|----------|-------------|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user