Skip to content

Commit

Permalink
refactor(tooltip): avoid conditional positioning on interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
emyarod committed Sep 18, 2019
1 parent 713c0a7 commit b64f389
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/components/src/globals/scss/_tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,8 @@
// @todo Simplify CSS selectors on next major release
&::before,
&::after,
&:hover .#{$prefix}--assistive-text,
&:focus .#{$prefix}--assistive-text,
&:hover + .#{$prefix}--assistive-text,
&:focus + .#{$prefix}--assistive-text {
.#{$prefix}--assistive-text,
+ .#{$prefix}--assistive-text {
@if ($position == 'top') {
top: 0;
left: 50%;
Expand Down Expand Up @@ -238,10 +236,8 @@
// alignment options available only for top and bottom tooltip position
// @todo Simplify CSS selectors on next major release
&::after,
&:hover .#{$prefix}--assistive-text,
&:focus .#{$prefix}--assistive-text,
&:hover + .#{$prefix}--assistive-text,
&:focus + .#{$prefix}--assistive-text {
.#{$prefix}--assistive-text,
+ .#{$prefix}--assistive-text {
@if ($position == 'top') {
top: -$body-spacing;
@if ($align == 'start') {
Expand Down

0 comments on commit b64f389

Please sign in to comment.