home-assistant.io/sass/homeassistant/plugins/_terminology_tooltip.scss
Madelena Mak d4c03fe1be
Update the theme to match branding better (#33462)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2024-06-30 13:47:01 +02:00

73 lines
1.2 KiB
SCSS

.terminology {
position: relative;
border-bottom: 2px dotted $primary-color;
cursor: help;
&:hover .terminology-tooltip {
visibility: visible;
opacity: 1;
}
.terminology-tooltip {
--horizontal-move: 0px;
visibility: hidden;
width: 250px;
background-color: $primary-color;
color: #fff;
font-size: 0.8em;
padding: 8px;
border-radius: 8px;
opacity: 0;
transition: opacity 0.5s;
position: absolute;
z-index: 1;
bottom: 100%;
left: calc(50% + var(--horizontal-move));
margin-left: -125px;
a {
color: #fff;
font-weight: 500;
}
@mixin arrow {
content: " ";
position: absolute;
left: calc(50% - var(--horizontal-move));
margin-left: -5px;
border-width: 5px;
border-style: solid;
}
&:after {
@include arrow;
top: 100%;
border-color: $primary-color transparent transparent transparent;
}
&.below {
bottom: auto;
top: 1lh;
&:before {
@include arrow;
top: -10px;
border-color: transparent transparent $primary-color transparent;
}
&:after {
display: none;
}
}
}
code {
border-bottom: 2px dotted $primary-color;
}
}