Skip to content

Commit

Permalink
refactor(tooltip): use var to define square range for arrow
Browse files Browse the repository at this point in the history
  • Loading branch information
igorwessel committed Jan 12, 2024
1 parent 9d8ac12 commit 7e018cb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/core/src/components/tooltip/tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.atom-tooltip {
--arrow-width: 10px;
--arrow-height: 8px;
--arrow-square-range: -3px;

background: var(--color-neutral-light-1);
border-radius: var(--border-radius);
Expand Down Expand Up @@ -40,19 +41,19 @@
}

&[data-popper-placement^='top'] > &__arrow {
bottom: -3px;
bottom: var(--arrow-square-range);
}

&[data-popper-placement^='bottom'] > &__arrow {
top: -3px;
top: var(--arrow-square-range);
}

&[data-popper-placement^='left'] > &__arrow {
right: -3px;
right: var(--arrow-square-range);
}

&[data-popper-placement^='right'] > &__arrow {
left: -3px;
left: var(--arrow-square-range);
}

&__content {
Expand Down

0 comments on commit 7e018cb

Please sign in to comment.