Skip to content

fix(material-experimental/mdc-button): rename state class #17575

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
Nov 4, 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
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-button/_button-base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// ripple and state container so that they fill the button, match the border radius, and avoid
// pointer events.
@mixin _mat-button-interactive() {
.mat-mdc-button-state::before, .mat-mdc-button-state::after {
.mdc-button__ripple::before, .mdc-button__ripple::after {
content: '';
pointer-events: none;
position: absolute;
Expand All @@ -20,7 +20,7 @@
}

// The ripple container should match the bounds of the entire button.
.mat-mdc-button-ripple, .mat-mdc-button-state {
.mat-mdc-button-ripple, .mdc-button__ripple {
@include mat-fill;

// Disable pointer events for the ripple container and state overlay because the container
Expand Down
2 changes: 1 addition & 1 deletion src/material-experimental/mdc-button/_mdc-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// Selector for the element that has a background color and opacity applied to its ::before and
// ::after for state interactions (hover, active, focus). Their API calls this their
// "ripple target", but we do not use it as our ripple, just state color.
$mat-button-state-target: '.mat-mdc-button-state';
$mat-button-state-target: '.mdc-button__ripple';

// Applies the disabled theme color to the text color.
@mixin _mat-button-disabled-color() {
Expand Down
2 changes: 1 addition & 1 deletion src/material-experimental/mdc-button/button.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span class="mat-mdc-button-state"></span>
<span class="mdc-button__ripple"></span>

<ng-content select=".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd])">
</ng-content>
Expand Down
4 changes: 3 additions & 1 deletion src/material-experimental/mdc-button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
// In order to work around this issue by *not* hiding overflow, we adjust the child elements
// to fully cover the actual button element. This means that the border-radius would be correct
// then. See: https://github.com/angular/components/issues/13738
.mat-mdc-outlined-button .mat-mdc-button-ripple {
.mat-mdc-outlined-button .mat-mdc-button-ripple,
.mat-mdc-outlined-button .mdc-button__ripple {
top: -$mdc-button-outlined-border-width;
left: -$mdc-button-outlined-border-width;
bottom: -$mdc-button-outlined-border-width;
right: -$mdc-button-outlined-border-width;
border: none;
}