chore: move null config check into mat-using-mdc-typography (#15906)

This commit is contained in:
mmalerba
2019-04-25 13:16:50 -07:00
committed by GitHub
parent 8f2391720d
commit 87b2cf6a87
7 changed files with 11 additions and 44 deletions
@@ -7,12 +7,7 @@
}
@mixin mat-button-typography-mdc($config) {
@if config {
@include mat-using-mdc-typography($config) {
// TODO: MDC typography styles here.
}
}
@else {
@include mat-using-mdc-typography($config) {
// TODO: MDC typography styles here.
}
}
@@ -7,12 +7,7 @@
}
@mixin mat-card-typography-mdc($config) {
@if config {
@include mat-using-mdc-typography($config) {
// TODO: MDC typography styles here.
}
}
@else {
@include mat-using-mdc-typography($config) {
// TODO: MDC typography styles here.
}
}
@@ -66,13 +66,7 @@
}
@mixin mat-checkbox-typography-mdc($config: null) {
@if $config {
@include mat-using-mdc-typography($config) {
@include mdc-checkbox-without-ripple($query: $mat-typography-styles-query);
@include mdc-form-field-core-styles($query: $mat-typography-styles-query);
}
}
@else {
@include mat-using-mdc-typography($config) {
@include mdc-checkbox-without-ripple($query: $mat-typography-styles-query);
@include mdc-form-field-core-styles($query: $mat-typography-styles-query);
}
@@ -199,7 +199,9 @@ $mat-typography-level-mappings: (
$orig-mdc-typography-styles: $mdc-typography-styles;
// Set new values based on the given Angular Material typography configuration.
$mdc-typography-styles: mat-typography-config-to-mdc($config) !global;
@if $config {
$mdc-typography-styles: mat-typography-config-to-mdc($config) !global;
}
// Apply given rules.
@content;
@@ -39,21 +39,12 @@
}
@mixin mat-menu-typography-mdc($config) {
@if config {
@include mat-using-mdc-typography($config) {
@include mdc-menu-surface-core-styles($mat-typography-styles-query);
.mat-mdc-menu-content {
// Note that we include this private mixin, because the public
// one adds a bunch of styles that we aren't using for the menu.
@include mdc-list-base_($mat-typography-styles-query);
}
}
}
@else {
@include mat-using-mdc-typography($config) {
@include mdc-menu-surface-core-styles($mat-typography-styles-query);
.mat-mdc-menu-content {
// Note that we include this private mixin, because the public
// one adds a bunch of styles that we aren't using for the menu.
@include mdc-list-base_($mat-typography-styles-query);
}
}
@@ -7,12 +7,7 @@
}
@mixin mat-radio-typography-mdc($config) {
@if config {
@include mat-using-mdc-typography($config) {
// TODO: MDC typography styles here.
}
}
@else {
@include mat-using-mdc-typography($config) {
// TODO: MDC typography styles here.
}
}
@@ -7,12 +7,7 @@
}
@mixin mat-slide-toggle-typography-mdc($config) {
@if config {
@include mat-using-mdc-typography($config) {
// TODO: MDC typography styles here.
}
}
@else {
@include mat-using-mdc-typography($config) {
// TODO: MDC typography styles here.
}
}