stylus/manage/tooltips.css
2020-03-10 19:33:14 -05:00

188 lines
3.3 KiB
CSS

:root {
--tooltip-bkgd: #555;
--tooltip-border: #777;
--tooltip-text: #fff;
--tooltip-error: #d40000;
--tooltip-warn: goldenrod;
}
[data-title] {
position: relative;
overflow: visible;
}
[data-title]:after {
-webkit-font-smoothing: subpixel-antialiased;
background: var(--tooltip-bkgd);
border: 1px solid var(--tooltip-border);
border-radius: 3px;
color: var(--tooltip-text);
content: attr(data-title);
font-size: 12px;
line-height: 1.5em;
letter-spacing: normal;
padding: .5em .75em;
text-align: center;
text-decoration: none;
text-shadow: none;
text-transform: none;
white-space: pre;
word-break: break-all;
overflow-wrap: break-word;
max-width: 50vw;
z-index: 1000000;
}
.targets [data-title]:after {
white-space: pre-wrap;
min-width: 240px;
}
.entry-last-update[data-title]:after {
text-align: left;
}
[data-title]:after,
[data-title]:before {
display: none;
pointer-events: none;
position: absolute;
}
[data-title]:before {
border: 6px solid transparent;
color: var(--tooltip-bkgd);
content: "";
height: 0;
width: 0;
z-index: 1000001;
}
[data-title]:hover:after,
[data-title]:hover:before {
display: inline-block;
text-decoration: none;
}
[data-title].tt-s:after,
[data-title].tt-se:after,
[data-title].tt-sw:after {
margin-top: 6px;
right: 50%;
top: 100%
}
[data-title].tt-s:before,
[data-title].tt-se:before,
[data-title].tt-sw:before {
border-bottom-color: var(--tooltip-bkgd);
bottom: -7px;
margin-right: -6px;
right: 50%;
top: auto
}
[data-title].tt-se:after {
left: 50%;
margin-left: -16px;
right: auto
}
[data-title].tt-sw:after {
margin-right: -16px
}
[data-title].tt-n:after,
[data-title].tt-ne:after,
[data-title].tt-nw:after {
bottom: 100%;
margin-bottom: 6px;
right: 50%
}
[data-title].tt-n:before,
[data-title].tt-ne:before,
[data-title].tt-nw:before {
border-top-color: var(--tooltip-bkgd);
bottom: auto;
margin-right: -6px;
right: 50%;
top: -7px
}
[data-title].tt-ne:after {
left: 50%;
margin-left: -16px;
right: auto
}
[data-title].tt-nw:after {
margin-right: -16px
}
[data-title].tt-n:after,
[data-title].tt-s:after {
transform: translateX(50%)
}
[data-title].tt-w:after {
bottom: 50%;
margin-right: 6px;
right: 100%;
transform: translateY(50%)
}
[data-title].tt-w:before {
border-left-color: var(--tooltip-bkgd);
bottom: 50%;
left: -7px;
margin-top: -6px;
top: 50%
}
[data-title].tt-e:after {
bottom: 50%;
left: 100%;
margin-left: 6px;
transform: translateY(50%)
}
[data-title].tt-e:before {
border-right-color: var(--tooltip-bkgd);
bottom: 50%;
margin-top: -6px;
right: -7px;
top: 50%
}
.can-update .updater-icons .update:before {
border-right-color: var(--tooltip-warn);
}
.entry-actions .entry-delete:before,
.update-problem .check-update:before {
border-right-color: var(--tooltip-error);
}
@media (max-width: 1100px) {
/* Action icons flip to left side; switch tooltip direction */
#main-actions [data-title].tt-w:after {
bottom: 50%;
left: 100%;
right: auto;
margin-left: 6px;
margin-right: 0;
transform: translateY(50%)
}
#main-actions [data-title].tt-w:before {
border-left-color: transparent;
border-right-color: var(--tooltip-bkgd);
bottom: 50%;
margin-top: -6px;
left: auto;
right: -7px;
top: 50%
}
}