-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
feat: add initial sass typography API #4162
Conversation
Adds an initial implementation for the API that'll be used to do the Material typography.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a couple of minor comments
@return map-get(map-get($config, $level), $name); | ||
} | ||
|
||
// Returns the font size for a level inside a typography config. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns
-> Gets
here and elsewhere
$font-weight: mat-font-weight($config, $level); | ||
$line-height: mat-line-height($config, $level); | ||
|
||
font: $font-weight #{$font-size}/#{$line-height} unquote(map-get($config, font-family)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment for what's going on here?
Addressed the feedback. |
$font-family: mat-font-family($config); | ||
|
||
// Use the shorthand `font` to represent a typography level, because it's the shortest. Notes that | ||
// we need to use interpolation for `font-size/line-height` in order to prevent SASS from diving |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏊 "dividing"
LGTM, can add merge-ready when you're ready |
When are you intending to have this be usable by the other material libraries in this repo and by user code? This looks promising! |
is there any example or doc reference for this feature? |
There's a guide at https://material.angular.io/guide/typography |
@crisbeto, thanks. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds an initial implementation for the API that'll be used to do the Material typography.
Note: These are just the various functions and mixins, they aren't being used anywhere yet. The usage for the
mat-typography
mixin can be: