feat: properly use fields, add tooltip as helptext
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2025-04-15 22:53:57 +02:00
parent e17cfb384c
commit 7ae4debfeb
4 changed files with 417 additions and 378 deletions

View File

@@ -66,3 +66,85 @@ body {
opacity: 1;
}
}
/*
TOOLTIP
Reused from Notfellchen
*/
.tooltip {
display: inline-flex;
justify-content: center;
position: relative;
}
.tooltip:hover .tooltiptext {
display: flex;
opacity: 1;
visibility: visible;
}
.tooltip .tooltiptext {
border-radius: 4px;
bottom: calc(100% + 0.6em + 2px);
box-shadow: 0px 2px 4px #07172258;
background-color: var(--primary-dark-one);
color: var(--secondary-light-one);
font-size: 0.68rem;
justify-content: center;
line-height: 1.35em;
padding: 0.5em 0.7em;
position: absolute;
text-align: center;
width: 7rem;
z-index: 1;
display: flex;
opacity: 0;
transition: all 0.3s ease-in;
visibility: hidden;
}
.tooltip .tooltiptext::before {
border-width: 0.6em 0.8em 0;
border-color: transparent;
border-top-color: var(--primary-dark-one);
content: "";
display: block;
border-style: solid;
position: absolute;
top: 100%;
}
/* Makes the tooltip fly from above */
.tooltip.top .tooltiptext {
margin-bottom: 8px;
}
.tooltip.top:hover .tooltiptext {
margin-bottom: 0;
}
/* Make adjustments for bottom */
.tooltip.bottom .tooltiptext {
top: calc(100% + 0.6em + 2px);
margin-top: 8px;
}
.tooltip.bottom:hover .tooltiptext {
margin-top: 0;
}
.tooltip.bottom .tooltiptext::before {
transform: rotate(180deg);
/* 100% of the height of .tooltip */
bottom: 100%;
}
.tooltip:not(.top) .tooltiptext {
bottom: auto;
}
.tooltip:not(.top) .tooltiptext::before {
top: auto;
}