diff --git a/ripple/lib/_ripple.scss b/ripple/lib/_ripple.scss index 066e22ea35..84819cb2f8 100644 --- a/ripple/lib/_ripple.scss +++ b/ripple/lib/_ripple.scss @@ -8,7 +8,6 @@ @use 'sass:map'; // go/keep-sorted end // go/keep-sorted start -@use '../../sass/theme'; @use '../../tokens'; // go/keep-sorted end @@ -34,10 +33,18 @@ } display: flex; + margin: auto; + pointer-events: none; } :host([disabled]) { - opacity: 0; + display: none; + } + + @media screen and (forced-colors: active) { + :host { + display: none; + } } :host, @@ -45,26 +52,23 @@ 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 { @@ -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; } } @@ -95,10 +99,4 @@ opacity: var(--_pressed-opacity); transition-duration: 105ms; } - - @media screen and (forced-colors: active) { - :host { - display: none; - } - } }