From 89a656bd6a58b1097374f598ebb82855e322ce6f Mon Sep 17 00:00:00 2001 From: juliajforesti Date: Thu, 17 Aug 2023 11:31:56 -0300 Subject: [PATCH] fix selector order --- .../src/components/Button/Button.styles.scss | 15 +++++++++------ .../fuselage/src/components/Button/Button.tsx | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/fuselage/src/components/Button/Button.styles.scss b/packages/fuselage/src/components/Button/Button.styles.scss index 07860a08be..63808f74b8 100644 --- a/packages/fuselage/src/components/Button/Button.styles.scss +++ b/packages/fuselage/src/components/Button/Button.styles.scss @@ -34,10 +34,14 @@ @mixin click-animation() { @include on-active { - transform: translateY(1px); + > * { + transform: translateY(1px); + } } @include on-pressed { - transform: translateY(1px); + > * { + transform: translateY(1px); + } } } @@ -47,9 +51,10 @@ white-space: nowrap; text-decoration: none; + @include click-animation(); + .rcx-button--content { display: inline-block; - @include click-animation(); } @include clickable; @@ -104,10 +109,8 @@ &--icon { @include button.kind-variant(colors.$icon); + @include click-animation(); - :only-child { - @include click-animation(); - } padding: 0; line-height: 0; diff --git a/packages/fuselage/src/components/Button/Button.tsx b/packages/fuselage/src/components/Button/Button.tsx index 1d89841cdb..e30b8a2b95 100644 --- a/packages/fuselage/src/components/Button/Button.tsx +++ b/packages/fuselage/src/components/Button/Button.tsx @@ -92,10 +92,10 @@ export const Button = forwardRef(function Button( {...extraProps} {...props} > - + {icon && } {children} - + ); });