Skip to content

Commit

Permalink
fix(button): Move theme-baseline() into base Sass.
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Removes button theme-baseline() mixin, moves mixin contents to base button Sass.

PiperOrigin-RevId: 317867315
  • Loading branch information
joyzhong authored and copybara-github committed Jun 23, 2020
1 parent ef3a095 commit 080965f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
7 changes: 1 addition & 6 deletions packages/mdc-button/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ $ripple-target: '.mdc-button__ripple';
@include ripple($query);
}

@mixin theme-baseline($query: feature-targeting-functions.all()) {
.mdc-button {
@include density(variables.$density-scale, $query: $query);
}
}

// This API is intended for use by frameworks that may want to separate the ripple-related styles from the other
// button styles. It is recommended that most users use `mdc-button-core-styles` instead.
@mixin without-ripple($query: feature-targeting-functions.all()) {
Expand All @@ -62,6 +56,7 @@ $ripple-target: '.mdc-button__ripple';
.mdc-button {
@include base_($query);
@include shape-radius(variables.$shape-radius, $query: $query);
@include density(variables.$density-scale, $query: $query);
@include container-fill-color(transparent, $query);
@include disabled-container-fill-color(transparent, $query);
// The icon CSS class overrides styles defined in the .material-icons CSS
Expand Down
2 changes: 1 addition & 1 deletion packages/mdc-button/mdc-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
//

@use "./mixins";

@include mixins.core-styles;
@include mixins.theme-baseline;
1 change: 0 additions & 1 deletion packages/mdc-button/test/feature-targeting-any.test.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
@include button.outline-width(0, $query: $query);
@include button.ripple($query: $query);
@include button.without-ripple($query: $query);
@include button.theme-baseline($query: $query);
@include button.density(-1, $query: $query);
@include button.height(0, $query: $query);
@include button.label-overflow-ellipsis($query: $query);
Expand Down

0 comments on commit 080965f

Please sign in to comment.