From c50363d8e836507872cdc52a65a4dfd031f4740b Mon Sep 17 00:00:00 2001 From: pndewit Date: Thu, 14 Dec 2017 01:20:31 +0100 Subject: [PATCH] feat(typography): Support custom properties in mdc-typography mixin (#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`. --- packages/mdc-typography/_mixins.scss | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/mdc-typography/_mixins.scss b/packages/mdc-typography/_mixins.scss index cd8fa9dfb02..1315383d34d 100644 --- a/packages/mdc-typography/_mixins.scss +++ b/packages/mdc-typography/_mixins.scss @@ -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) {