Skip to content

Commit

Permalink
feat(typography): Support custom properties in mdc-typography mixin (#…
Browse files Browse the repository at this point in the history
…1664)

Apply all styles from `$mdc-typography-styles` instead of just a select set of properties.

This allows users to override `$mdc-typography-styles` and add custom properties which will then be used everywhere. For example, adding `color` or a different `font-family`.
  • Loading branch information
pndewit authored and acdvorak committed Dec 14, 2017
1 parent 4c68267 commit c50363d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/mdc-typography/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@

@include mdc-typography-base;

font-size: map-get($style-props, font-size);
font-weight: #{map-get($style-props, font-weight)};
letter-spacing: map-get($style-props, letter-spacing);
line-height: map-get($style-props, line-height);
text-decoration: map-get($style-props, text-decoration);
text-transform: map-get($style-props, text-transform);
$style-props: map-remove($style-props, margin);

@each $key, $value in $style-props {
#{$key}: $value;
}
}

@mixin mdc-typography-adjust-margin($style) {
Expand Down

0 comments on commit c50363d

Please sign in to comment.