@appearhere/bloom
Version:
Appear Here's pattern library and styleguide
164 lines (144 loc) • 2.65 kB
CSS
.root {
width: 100%;
position: relative;
height: 44vh;
overflow: hidden;
max-height: 64rem;
}
.backgroundImage {
height: 88vh;
}
.background {
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
width: 100%;
height: 100%;
}
.animate .background {
width: 100%;
height: 100%;
transform: scale(1.2);
animation-name: backgroundScale;
animation-timing-function: var(--animation-sharp);
animation-duration: 500ms;
animation-delay: 2000ms;
animation-fill-mode: forwards;
animation-iteration-count: 1;
-webkit-backface-visibility: hidden;
}
.overlay {
position: absolute;
top: 0;
left: 0;
display: table;
height: 100%;
width: 100%;
}
.backgroundImage .overlay {
background-color: rgba(0, 0, 0, 0.5);
}
.animate.backgroundImage {
animation-name: overlayFadeIn;
animation-duration: 500ms;
animation-delay: 2000ms;
animation-fill-mode: forwards;
animation-iteration-count: 1;
opacity: 0;
-webkit-backface-visibility: hidden;
}
.inner {
display: table-cell;
width: 100%;
padding-top: var(--space-96);
padding-bottom: var(--space-96);
vertical-align: middle;
text-align: center;
}
.content {
max-width: 80rem;
margin-left: auto;
margin-right: auto;
width: 100%;
padding-left: var(--size-large);
padding-right: var(--size-large);
}
.animate .inner {
padding-top: 11vh;
animation-name: textFadeIn;
animation-duration: 750ms;
animation-delay: 2000ms;
animation-fill-mode: forwards;
animation-iteration-count: 1;
opacity: 0;
transform: translateY(6.25rem);
-webkit-backface-visibility: hidden;
}
.caption {
display: none;
}
@media (--wrapper-large) {
.content {
padding-left: var(--space-48);
padding-right: var(--space-48);
}
}
@media(--hero-width-lg-i) {
.caption {
display: block;
position: absolute;
color: var(--color-greyLightest);
bottom: var(--size-large);
right: var(--size-large);
}
}
@media(--hero-height-lg-i) {
.root {
max-height: 50rem;
}
.animate {
max-height: 100vh;
}
}
@media(--hero-height-lg-ii) {
.root {
max-height: 64rem;
}
.animate {
max-height: 100vh;
}
}
@keyframes panelMove {
from {
transform: translateY(0);
}
to {
transform: translateY(-11vh);
}
}
@keyframes backgroundScale {
from {
transform: scale(1.2);
}
to {
transform: scale(1);
}
}
@keyframes overlayFadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes textFadeIn {
from {
opacity: 0;
transform: translateY(6.25rem);
}
to {
opacity: 1;
transform: translateY(0);
}
}