fix: add dropshadow to popover, cleanup animation

This commit is contained in:
Jacky Zhao 2022-04-05 23:19:33 -07:00
parent 12ed9722d8
commit f05ff5e62d
1 changed files with 27 additions and 12 deletions

View File

@ -491,30 +491,39 @@ header {
} }
} }
@keyframes dropin {
0% {
display: none;
opacity: 0;
visibility: hidden;
}
1% {
display: inline-block;
opacity: 0;
transform: translate(-50%, 40%);
}
100% {
opacity: 1;
visibility: visible;
transform: translate(-50%, 20%);
}
}
.popover { .popover {
z-index: 999; z-index: 999;
position: absolute; position: absolute;
width: 20em; width: 20em;
display: inline-block; display: none;
visibility: hidden;
background-color: var(--light); background-color: var(--light);
padding: 1em; padding: 1em;
border: 1px solid var(--outlinegray); border: 1px solid var(--outlinegray);
border-radius: 5px; border-radius: 5px;
transform: translate(-50%, 40%); transform: translate(-50%, 40%);
opacity: 0;
pointer-events: none; pointer-events: none;
transition: opacity 0.2s ease, transform 0.2s ease; transition: opacity 0.2s ease, transform 0.2s ease;
transition-delay: 0.1s;
user-select: none; user-select: none;
overflow-wrap: anywhere;
& > * { box-shadow: 6px 6px 36px 0px rgba(0,0,0,0.25);
display: none;
}
&.visible > * {
display: inline-block;
}
@media all and (max-width: 600px) { @media all and (max-width: 600px) {
display: none; display: none;
@ -524,6 +533,8 @@ header {
opacity: 1; opacity: 1;
visibility: visible; visibility: visible;
transform: translate(-50%, 20%); transform: translate(-50%, 20%);
display: inline-block;
animation: dropin 0.2s ease;
} }
& > h3 { & > h3 {
@ -534,6 +545,8 @@ header {
& > .meta { & > .meta {
margin-top: 0.25em; margin-top: 0.25em;
opacity: 0.5; opacity: 0.5;
font-family: "JetBrains Mono", monospace;
font-size: 0.8rem;
} }
& > p { & > p {
@ -543,6 +556,8 @@ header {
} }
} }
#contact_buttons ul { #contact_buttons ul {
list-style-type: none; list-style-type: none;