From b64f38989cb65e00d0989e811bbcd501b982380f Mon Sep 17 00:00:00 2001 From: emyarod Date: Tue, 17 Sep 2019 21:49:31 -0500 Subject: [PATCH] refactor(tooltip): avoid conditional positioning on interaction --- packages/components/src/globals/scss/_tooltip.scss | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/components/src/globals/scss/_tooltip.scss b/packages/components/src/globals/scss/_tooltip.scss index 57f005760791..0e474fb9ac2d 100644 --- a/packages/components/src/globals/scss/_tooltip.scss +++ b/packages/components/src/globals/scss/_tooltip.scss @@ -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%; @@ -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') {