Skip to content

Commit

Permalink
fix(ADA-492): Low vision users or users requiring screen to be magnif…
Browse files Browse the repository at this point in the history
…ied will have difficulties to read through the additional information presented (#878)

Issue:
When hovering on controls tooltip is displayed, when you try to move the mouse inside the tooltip area the tooltip disappear.

Fix:
Adding inset around the tooltip so user can move inside the tooltip before it disappear.

Resolves ADA-492
  • Loading branch information
Tzipi-kaltura authored May 7, 2024
1 parent a00d751 commit 0168fa2
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions src/components/tooltip/_tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
width: max-content;
display: table;

&:after {
&:before {
content: '';
position: absolute;
border-width: 5px;
Expand All @@ -34,11 +34,16 @@
color: $tooltip-background-color;
z-index: -1;
}
&:after {
content: '';
position: absolute;
inset: -1em;
}
&.tooltip-top {
bottom: $tooltip-margin;
left: 50%;
transform: translate(-50%);
&:after {
&:before {
bottom: -$tooltip-arrow-height;
left: 50%;
transform: translate(-50%) rotate(45deg) skew(5deg, 5deg);
Expand All @@ -49,7 +54,7 @@
left: 50%;
transform: translate(-100%);
margin-left: $tooltip-semi-side-margin;
&:after {
&:before {
bottom: -$tooltip-arrow-height;
right: 0;
margin-right: $tooltip-semi-side-arrow-margin;
Expand All @@ -60,7 +65,7 @@
bottom: $tooltip-margin;
left: 50%;
transform: translate(-$tooltip-semi-side-margin);
&:after {
&:before {
bottom: -$tooltip-arrow-height;
left: 0;
margin-left: $tooltip-semi-side-arrow-margin;
Expand All @@ -71,7 +76,7 @@
top: $tooltip-margin;
left: 50%;
transform: translate(-50%);
&:after {
&:before {
top: -$tooltip-arrow-height;
left: 50%;
margin-left: -5px;
Expand All @@ -82,7 +87,7 @@
top: $tooltip-margin;
left: 50%;
transform: translate(-$tooltip-semi-side-margin);
&:after {
&:before {
top: -$tooltip-arrow-height;
left: 0;
margin-left: $tooltip-semi-side-arrow-margin;
Expand All @@ -94,7 +99,7 @@
transform: translate(-100%);
left: 50%;
margin-left: $tooltip-semi-side-margin;
&:after {
&:before {
top: -$tooltip-arrow-height;
right: 0;
margin-right: $tooltip-semi-side-arrow-margin;
Expand All @@ -105,7 +110,7 @@
top: 50%;
right: $tooltip-margin;
transform: translate(0, -50%);
&:after {
&:before {
top: 50%;
left: 100%;
margin-left: -6px;
Expand All @@ -117,7 +122,7 @@
top: 50%;
left: $tooltip-margin;
transform: translate(0, -50%);
&:after {
&:before {
top: 50%;
right: 100%;
margin-top: -5px;
Expand Down

0 comments on commit 0168fa2

Please sign in to comment.