janus/styles/main.css
2016-10-10 12:47:11 -04:00

121 lines
2.1 KiB
CSS

/* Basics */
*, *:before, *:after {
box-sizing: inherit;
margin: 0;
padding: 0;
}
:root {
box-sizing: border-box;
line-height: 1.5;
font-family: sans-serif;
font-size: calc(2vw + 2em);
}
li {
list-style: none;
}
/* Layout */
body {
display: flex;
flex-direction: column;
padding: 0;
margin: 0;
background-color: black;
color: white;
overflow: hidden;
}
main {
margin-top: 0;
perspective: 100vmin;
transform-style: preserve-3d;
height: 100vh;
}
/* Components */
section {
position: absolute;
z-index: 1;
display: flex;
flex-direction: column;
justify-content: center;
width: 100%;
height: 100%;
margin: 0;
padding: 1em;
overflow: hidden;
text-align: center;
background-color: black;
transition: transform ease 0.5s, opacity ease 0.5s, visibility step-end 0.5s;
transform-origin: 50% 50%;
}
[janus-timeline='past'] {
transition: transform ease-in 0.5s, opacity ease-in 0.5s, visibility step-end 0.5s;
}
[janus-timeline='present'] {
transition: transform ease-out 0.5s, opacity ease-out 0.5s, visibility step-start 0.5s;
}
@media only screen {
[janus-timeline='future'] {
opacity: 0.5;
}
}
@media not print {
[janus-timeline='future'] {
visibility: hidden;
}
}
section[janus-timeline='past'] {
transform: translate3d(0, 0, 0) scale(5);
opacity: 0;
visibility: hidden;
pointer-events: none;
z-index: 2;
}
section[janus-timeline='present'] {
transform: none;
opacity: 1;
}
section[janus-timeline='future'] {
transform: translate3d(0, -5vmin, 0) scale(0.8);
opacity: 0;
visibility: hidden;
pointer-events: none;
}
img.cover {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
object-fit: cover;
z-index: -1;
}
body.show-notes section {
transition: none;
}
body.show-notes section[janus-timeline='present'] + section[janus-timeline='future'] {
transform: scale(0.25);
transform-origin: bottom right;
top: auto;
left: auto;
bottom: 0.4rem;
right: 0.4rem;
opacity: 0.75;
visibility: visible;
outline: 0.1rem solid white;
z-index: 3;
}