nightTab/css/tip.css

72 lines
1.3 KiB
CSS

.tip {
position: absolute;
max-width: 20em;
margin: 1em 1em;
left: 0;
top: 0;
opacity: 1;
z-index: var(--z-index-tip);
transition: opacity var(--animation-speed-fast) ease-in-out;
transform-origin: bottom center;
pointer-events: none;
}
@keyframes grow {
0% {
transform: translate(0, 0.2em) scale(0.95);
clip-path: circle(0 at 50% 100%);
}
100% {
transform: translate(0, 0) scale(1);
clip-path: circle(100% at 50% 100%);
}
}
@keyframes shirnk {
0% {
transform: translate(0, 0) scale(1);
clip-path: circle(100% at 50% 100%);
}
100% {
transform: translate(0, 0.2em) scale(0.95);
clip-path: circle(0 at 50% 100%);
}
}
.tip-intro {
animation: grow var(--animation-speed-slow) 1;
}
.tip-outro {
animation: shirnk var(--animation-speed-slow) 1;
}
.tip-message {
padding: 0.5em 1em;
background-color: rgb(var(--gray-04));
border: 0;
border-radius: calc(var(--radius) * 2);
color: rgb(var(--gray-18));
font-size: 0.8em;
font-family: var(--font-regular);
text-align: center;
position: relative;
display: block;
z-index: 1;
}
.tip-arrow {
border: 0.5em solid transparent;
border-top-color: rgb(var(--gray-04));
position: absolute;
width: 0;
height: 0;
top: 100%;
left: 50%;
display: block;
z-index: 2;
transform: translate(-50%, 0);
}