Skip to content
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
14 changes: 12 additions & 2 deletions src/material/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ $fallbacks: m3-button.get-tokens();
min-height: fit-content;
flex-shrink: 0;
}

// Hide the hover ripple on devices that don't support hover. Note that we have the `span`
// in the selector in order to increase the specificity over the actual hover styles.
@media (hover: none) {
&:hover > span.mat-mdc-button-persistent-ripple::before {
opacity: 0;
}
}
}

.mdc-button {
Expand Down Expand Up @@ -163,8 +171,10 @@ $fallbacks: m3-button.get-tokens();
border-radius: token-utils.slot(button-protected-container-shape, $fallbacks);
}

&:hover {
box-shadow: token-utils.slot(button-protected-hover-container-elevation-shadow, $fallbacks);
@media (hover: hover) {
&:hover {
box-shadow: token-utils.slot(button-protected-hover-container-elevation-shadow, $fallbacks);
}
}

&:focus {
Expand Down
18 changes: 12 additions & 6 deletions src/material/button/fab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ $fallbacks: m3-fab.get-tokens();
color: token-utils.slot(fab-foreground-color, $fallbacks, inherit);
box-shadow: token-utils.slot(fab-container-elevation-shadow, $fallbacks);

&:hover {
box-shadow: token-utils.slot(fab-hover-container-elevation-shadow, $fallbacks);
@media (hover: hover) {
&:hover {
box-shadow: token-utils.slot(fab-hover-container-elevation-shadow, $fallbacks);
}
}

&:focus {
Expand Down Expand Up @@ -133,8 +135,10 @@ $fallbacks: m3-fab.get-tokens();
color: token-utils.slot(fab-small-foreground-color, $fallbacks, inherit);
box-shadow: token-utils.slot(fab-small-container-elevation-shadow, $fallbacks);

&:hover {
box-shadow: token-utils.slot(fab-small-hover-container-elevation-shadow, $fallbacks);
@media (hover: hover) {
&:hover {
box-shadow: token-utils.slot(fab-small-hover-container-elevation-shadow, $fallbacks);
}
}

&:focus {
Expand Down Expand Up @@ -176,8 +180,10 @@ $fallbacks: m3-fab.get-tokens();
font-weight: token-utils.slot(fab-extended-label-text-weight, $fallbacks);
letter-spacing: token-utils.slot(fab-extended-label-text-tracking, $fallbacks);

&:hover {
box-shadow: token-utils.slot(fab-extended-hover-container-elevation-shadow, $fallbacks);
@media (hover: hover) {
&:hover {
box-shadow: token-utils.slot(fab-extended-hover-container-elevation-shadow, $fallbacks);
}
}

&:focus {
Expand Down
Loading