Skip to content

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

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

Merged
merged 1 commit into from
Apr 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/material-experimental/mdc-button/_mdc-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 1 addition & 6 deletions src/material-experimental/mdc-card/_mdc-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
}
8 changes: 1 addition & 7 deletions src/material-experimental/mdc-checkbox/_mdc-checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 3 additions & 1 deletion src/material-experimental/mdc-helpers/_mdc-helpers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
15 changes: 3 additions & 12 deletions src/material-experimental/mdc-menu/_mdc-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
7 changes: 1 addition & 6 deletions src/material-experimental/mdc-radio/_mdc-radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
}