Fix tooltip shadow and position and improve unittests

This commit is contained in:
2024-12-13 11:43:34 +01:00
parent 4975475e85
commit 2cc4308a58
4 changed files with 44 additions and 19 deletions

View File

@ -29,4 +29,9 @@ $shadow-color: rgb(223, 223, 223);
$background-button-color: hsl(0, 0%, 95%);
$deepblue: #354a5f;
$deepblue: #354a5f;
@mixin shadow {
box-shadow: rgba(60, 64, 67, 0.3) 0 1px 3px 0,
rgba(60, 64, 67, 0.15) 0 4px 8px 3px;
}

View File

@ -46,22 +46,25 @@ body {
position: relative;
}
[tooltip]:before {
[tooltip]::before {
@include shadow;
opacity: 0;
z-index: 1;
content: attr(tooltip);
background: $white-color;
background: hsl(219.6, 20.8%, 96%);
color: $black-color;
border: 1px solid $black-color;
border: 0.5px solid hsl(0, 0%, 50%);
;
border-radius: 5px;
padding: 5px;
top: 1em;
position: absolute;
margin-top: 5px;
white-space: nowrap;
transition: opacity 500ms ease-out;
}
[tooltip]:hover:before {
[tooltip]:hover::before {
opacity: 1;
}
@ -102,8 +105,7 @@ body {
}
.shadow {
box-shadow: rgba(60, 64, 67, 0.3) 0 1px 3px 0,
rgba(60, 64, 67, 0.15) 0 4px 8px 3px;
@include shadow;
}
.w_big {