mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-05-12 22:19:00 +00:00

* Positioning terminology tooltip to be always fully visible #resolves https://github.com/home-assistant/home-assistant.io/issues/31341 * terminology_tooltip: removed debugs resolves7a0183402f (r1485840114)
* terminology_tooltip: removed $–convention from var names resolves7a0183402f (r1485839944)
* terminology_tooltip: let -> const --------- Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
70 lines
1.2 KiB
SCSS
70 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;
|
|
}
|
|
}
|
|
}
|
|
}
|