Skip to content

Commit

Permalink
fix(select): md-optgroup not using typography styles (#5193)
Browse files Browse the repository at this point in the history
Resolves a TODO from a while ago to set up the `md-optgroup` to use the typography API. This wasn't done initially since the typography PR and the option group PR got in around the same time.
  • Loading branch information
crisbeto authored and jelbourn committed Jun 20, 2017
1 parent 138abf8 commit b5bf6f5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 7 additions & 0 deletions src/lib/core/option/_optgroup-theme.scss
@@ -1,5 +1,6 @@
@import '../theming/palette';
@import '../theming/theming';
@import '../typography/typography-utils';

@mixin mat-optgroup-theme($theme) {
$foreground: map-get($theme, foreground);
Expand All @@ -12,3 +13,9 @@
color: mat-color($foreground, hint-text);
}
}

@mixin mat-optgroup-typography($config) {
.mat-optgroup-label {
@include mat-typography-level-to-styles($config, body-2);
}
}
4 changes: 0 additions & 4 deletions src/lib/core/option/_optgroup.scss
Expand Up @@ -6,9 +6,5 @@
@include mat-menu-item-base();
@include user-select(none);
cursor: default;

// TODO(crisbeto): should use the typography functions once #4375 is in.
font-weight: bold;
font-size: 14px;
}
}
2 changes: 2 additions & 0 deletions src/lib/core/typography/_all-typography.scss
Expand Up @@ -24,6 +24,7 @@
@import '../../tooltip/tooltip-theme';
@import '../../snack-bar/simple-snack-bar-theme';
@import '../option/option-theme';
@import '../option/optgroup-theme';


// Includes all of the typographic styles.
Expand Down Expand Up @@ -53,5 +54,6 @@
@include mat-tooltip-typography($config);
@include mat-list-typography($config);
@include mat-option-typography($config);
@include mat-optgroup-typography($config);
@include mat-simple-snack-bar-typography($config);
}

0 comments on commit b5bf6f5

Please sign in to comment.