erynwells.me/content/home.css

154 lines
2.7 KiB
CSS
Raw Normal View History

2022-09-03 15:30:38 -07:00
:root {
--animation-offset: 6px;
2022-09-03 15:30:38 -07:00
}
body {
display: flex;
flex-direction: column;
2022-09-03 15:30:38 -07:00
font-size: 2rem;
justify-content: center;
margin: auto;
2022-09-03 15:30:38 -07:00
}
h1 {
font-size: 5rem;
line-height: 1.3;
2022-09-03 15:30:38 -07:00
margin: 0;
padding: 0;
}
@media (max-width: 450px) {
h1 { font-size: 4.25rem; }
}
main {
margin-block-start: 10vh;
2022-09-03 15:30:38 -07:00
}
main .grid {
2022-09-03 15:30:38 -07:00
align-items: baseline;
display: grid;
gap: 0 2rem;
grid-template-columns: min-content fit-content(35%);
2022-09-03 15:30:38 -07:00
grid-template-rows: repeat(2, max-content);
grid-template-areas:
"title blurb"
"title nav";
padding-inline: 1em;
width: min-content;
2022-09-03 15:30:38 -07:00
}
@media (max-width: 450px) {
main .grid {
gap: 1rem 0;
2022-09-03 15:30:38 -07:00
grid-template-columns: 1fr;
grid-template-rows: repeat(3, max-content);
grid-template-areas:
"title"
"blurb"
"nav";
2022-09-03 15:30:38 -07:00
text-align: center;
}
}
main h1 {
letter-spacing: 0.025em;
text-align: end;
}
@media (max-width: 450px) {
main h1 { text-align: center; }
}
main nav {
align-items: baseline;
2022-09-03 15:30:38 -07:00
}
main p {
margin: 0;
2022-09-03 15:30:38 -07:00
}
#title { grid-area: title; }
#content { grid-area: blurb }
#nav { grid-area: nav }
#title > *, #content > *, #nav > * { position: relative; }
#title > * {
animation: left-fade-in var(--transition-duration) ease-in-out;
}
@media (max-width: 450px) {
#title > * {
animation: top-fade-in var(--transition-duration) ease-in-out;
}
}
#content > *, #nav > * {
animation: right-fade-in var(--transition-duration) ease-in-out;
2022-09-03 15:30:38 -07:00
}
@media (max-width: 450px) {
#content > *, #nav > * {
animation: bottom-fade-in var(--transition-duration) ease-in-out;
}
}
2022-09-03 15:30:38 -07:00
@keyframes left-fade-in {
from {
opacity: 0%;
left: var(--animation-offset);
}
33% {
opacity: 0%;
left: var(--animation-offset);
}
to {
opacity: 100%;
left: 0;
}
2022-09-03 15:30:38 -07:00
}
@keyframes right-fade-in {
from {
opacity: 0%;
left: calc(-1 * var(--animation-offset));
}
33% {
opacity: 0%;
left: calc(-1 * var(--animation-offset));
}
to {
opacity: 100%;
left: 0;
}
2022-09-03 15:30:38 -07:00
}
@keyframes top-fade-in {
from {
opacity: 0%;
bottom: calc(-1 * var(--animation-offset));
}
33% {
opacity: 0%;
bottom: calc(-1 * var(--animation-offset));
}
to {
opacity: 100%;
bottom: 0;
}
}
@keyframes bottom-fade-in {
from {
opacity: 0%;
bottom: var(--animation-offset);
}
33% {
opacity: 0%;
bottom: var(--animation-offset);
}
to {
opacity: 100%;
bottom: 0;
}
}
.platter {
padding: 1.5rem 3rem;
2022-09-03 15:30:38 -07:00
}