Skip to content

Commit

Permalink
no hover effect when iconbutton is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
atabel committed Jul 19, 2023
1 parent 28761f6 commit f7e9586
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions src/card.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,13 @@ export const cardAction = style([
transition: 'background-color 0.2s ease-in-out',
'@media': {
[mq.supportsHover]: {
':hover': {
background: skinVars.colors.backgroundContainerHover,
},
':active': {
background: skinVars.colors.backgroundContainerPressed,
selectors: {
':not(:disabled) > &:hover': {
background: skinVars.colors.backgroundContainerHover,
},
':not(:disabled) > &:active': {
background: skinVars.colors.backgroundContainerPressed,
},
},
},
},
Expand All @@ -298,11 +300,13 @@ export const cardActionInverse = style([
transition: 'background-color 0.2s ease-in-out',
'@media': {
[mq.supportsHover]: {
':hover': {
background: skinVars.colors.backgroundContainerBrandHover,
},
':active': {
background: skinVars.colors.backgroundContainerBrandPressed,
selectors: {
':not(:disabled) > &:hover': {
background: skinVars.colors.backgroundContainerBrandHover,
},
':not(:disabled) > &:active': {
background: skinVars.colors.backgroundContainerBrandPressed,
},
},
},
},
Expand All @@ -316,11 +320,13 @@ export const cardActionMedia = style([
transition: 'background-color 0.2s ease-in-out',
'@media': {
[mq.supportsHover]: {
':hover': {
backgroundColor: applyAlpha(skinVars.rawColors.inverse, 0.9),
},
':active': {
backgroundColor: applyAlpha(skinVars.rawColors.inverse, 1.0),
selectors: {
':not(:disabled) > &:hover': {
backgroundColor: applyAlpha(skinVars.rawColors.inverse, 0.9),
},
':not(:disabled) > &:active': {
backgroundColor: applyAlpha(skinVars.rawColors.inverse, 1.0),
},
},
},
},
Expand Down

0 comments on commit f7e9586

Please sign in to comment.