Skip to content

docs(material/theming): rewrite typography guide for @use #22366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2021

Conversation

jelbourn
Copy link
Member

This change completely rewrites the typography guide to be more
complete, correct, and concise.

Summary of changes:

  • Explain the concepts of "typography level" and "typography config".
  • Ensure all content is conceptual and not task-based.
  • Use new Sass @use API introduiced in feat(material/core): expose new @use-based Sass API #22173
  • Split up level descriptions from CSS classes
  • Clarify that the system currently uses the 2014-era typography levels

This is the second PR in a series, following #22268. After this will be
PRs for theming-your-components, customizing-component-styles, and new
docs for strong focus indicators.

@jelbourn jelbourn added P2 The issue is important to a large percentage of users, with a workaround docs This issue is related to documentation merge safe target: major This PR is targeted for the next major release labels Mar 30, 2021
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Mar 30, 2021
Copy link
Contributor

@twerske twerske left a comment

Choose a reason for hiding this comment

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

A few comments but LGTM - yay theming! 👍

@aikithoughts aikithoughts requested a review from TeriGlover March 30, 2021 17:18
@aikithoughts
Copy link

@TeriGlover Can you have a look at this content?

@jelbourn Is there a way to stage this content so we can see how it renders on the screen?

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM with a few nits.

```
| Name | Description |
|-----------------|-----------------------------------------------------------------------------|
| `display-4` | Large, one-off header, usually at the top of the page (e.g. a hero header). |
Copy link
Member

Choose a reason for hiding this comment

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

Should we change up the wording between the different display- values? Otherwise it looks like they're all the same.

Copy link
Member Author

Choose a reason for hiding this comment

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

TBH I don't really know what differentiates them.

Copy link
Member

Choose a reason for hiding this comment

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

Their font sizes are different:

  $display-4:     define-typography-level(112px, 112px, 300, $letter-spacing: -0.05em),
  $display-3:     define-typography-level(56px, 56px, 400, $letter-spacing: -0.02em),
  $display-2:     define-typography-level(45px, 48px, 400, $letter-spacing: -0.005em),
  $display-1:     define-typography-level(34px, 40px, 400),

Copy link
Member Author

Choose a reason for hiding this comment

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

I meant semantically, since they're all just different flavors of big. I think you're right, though, that explicitly saying the font-size is really the only meaningful way to convey the difference.

@jelbourn jelbourn force-pushed the typography-docs-revamp branch from 0cd93a3 to 08181d1 Compare March 30, 2021 18:54
@jelbourn jelbourn removed the request for review from aikithoughts March 31, 2021 00:03
@jelbourn jelbourn force-pushed the typography-docs-revamp branch from 08181d1 to af51007 Compare March 31, 2021 00:08
Copy link
Contributor

@andrewseguin andrewseguin left a comment

Choose a reason for hiding this comment

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

Looks great, good job explaining all the facets. Feel free to mark merge ready when you want


A **typography level** is a collection of typographic styles that corresponds to a specific
part of an application's structure, such as a header. Each level includes styles for font family,
font weight, font size, and letter-spacing. Angular Material uses the [typography levels

Choose a reason for hiding this comment

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

Suggested change
font weight, font size, and letter-spacing. Angular Material uses the [typography levels
font weight, font size, and letter spacing. Angular Material uses the [typography levels

This change completely rewrites the typography guide to be more
complete, correct, and concise.

Summary of changes:
* Explain the concepts of "typography level" and "typography config".
* Ensure all content is conceptual and not task-based.
* Use new Sass `@use` API introduiced in angular#22173
* Split up level descriptions from CSS classes
* Clarify that the system currently uses the 2014-era typography levels

This is the second PR in a series, following angular#22268. After this will be
PRs for theming-your-components, customizing-component-styles, and new
docs for strong focus indicators.
@jelbourn jelbourn added the action: merge The PR is ready for merge by the caretaker label Mar 31, 2021
@jelbourn jelbourn force-pushed the typography-docs-revamp branch from af51007 to d259c4b Compare March 31, 2021 21:17
@annieyw annieyw merged commit 34dba13 into angular:master Apr 1, 2021
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement docs This issue is related to documentation P2 The issue is important to a large percentage of users, with a workaround target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants