Skip to content

Commit

Permalink
chore(ripple): clean up styles
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 535296881
  • Loading branch information
asyncLiz authored and copybara-github committed May 25, 2023
1 parent 696a71f commit 2339534
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions ripple/lib/_ripple.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
@use 'sass:map';
// go/keep-sorted end
// go/keep-sorted start
@use '../../sass/theme';
@use '../../tokens';
// go/keep-sorted end

Expand All @@ -34,37 +33,42 @@
}

display: flex;
margin: auto;
pointer-events: none;
}

:host([disabled]) {
opacity: 0;
display: none;
}

@media screen and (forced-colors: active) {
:host {
display: none;
}
}

:host,
.surface {
border-radius: inherit;
position: absolute;
inset: 0;
pointer-events: none;
overflow: hidden;
}

.surface {
outline: none;
-webkit-tap-highlight-color: transparent;

&::before,
&::after {
position: absolute;
opacity: 0;
pointer-events: none;
content: '';
opacity: 0;
position: absolute;
}

&::before {
background-color: var(--_hover-color);
transition: opacity 15ms linear, background-color 15ms linear;
inset: 0;
transition: opacity 15ms linear, background-color 15ms linear;
}

&::after {
Expand All @@ -74,8 +78,8 @@
var(--_pressed-color) max(calc(100% - 70px), 65%),
transparent 100%
);
transition: opacity 375ms linear;
transform-origin: center center;
transition: opacity 375ms linear;
}
}

Expand All @@ -95,10 +99,4 @@
opacity: var(--_pressed-opacity);
transition-duration: 105ms;
}

@media screen and (forced-colors: active) {
:host {
display: none;
}
}
}

0 comments on commit 2339534

Please sign in to comment.