Skip to content

Commit

Permalink
fix selector order
Browse files Browse the repository at this point in the history
  • Loading branch information
juliajforesti committed Aug 17, 2023
1 parent 12fd783 commit 89a656b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
15 changes: 9 additions & 6 deletions packages/fuselage/src/components/Button/Button.styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand All @@ -47,9 +51,10 @@
white-space: nowrap;
text-decoration: none;

@include click-animation();

.rcx-button--content {
display: inline-block;
@include click-animation();
}

@include clickable;
Expand Down Expand Up @@ -104,10 +109,8 @@

&--icon {
@include button.kind-variant(colors.$icon);
@include click-animation();

:only-child {
@include click-animation();
}
padding: 0;

line-height: 0;
Expand Down
4 changes: 2 additions & 2 deletions packages/fuselage/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ export const Button = forwardRef(function Button(
{...extraProps}
{...props}
>
<Box is='span' rcx-button--content>
<span className='rcx-button--content'>
{icon && <Icon size='x16' name={icon} mie={4} />}
{children}
</Box>
</span>
</Box>
);
});
Expand Down

0 comments on commit 89a656b

Please sign in to comment.