@import 'breakpoints'; @import 'colors'; * { box-sizing: border-box; font-family: sans-serif; margin: 0; padding: 0; } body { color: $color-text; display: flex; flex-direction: column; margin: 0 auto; min-height: 100vh; max-width: $large; main { flex-grow: 1; } } header, footer { padding: 0 1rem; } header { align-items: center; display: flex; flex-wrap: wrap; justify-content: space-between; margin-top: 0.5rem; pre { font-family: monospace; font-size: 0.8rem; line-height: 1; user-select: none; } nav { font-size: 1.2rem; } } main { padding: 1rem; } footer { margin-bottom: 0.5rem; nav { align-items: end; @media screen and (min-width: $small) { align-items: normal; justify-content: end; } } } nav { display: flex; flex-direction: column; &.nav-toggleable { flex-basis: 100%; max-height: 0; overflow-y: hidden; transition: max-height 0.5s; .nav-toggle:checked ~ & { max-height: calc(var(--num-elements) * 2em); } } a { line-height: 1.5em; margin: 0.5em 0 0 0; } @media screen and (min-width: $small) { flex-direction: row; &.nav-toggleable { flex-basis: auto; max-height: max-content; } a { margin: 0 0 0 1em; } } } a { color: currentColor; text-decoration: none; &:hover { text-decoration: underline; } &.is-active { color: $color-highlight; &:hover { text-decoration: none; } } } h1, h2, h3, h4, h5, h6 { margin-bottom: 0.5em; } p { margin-bottom: 1em; } .nav-burger { cursor: pointer; display: flex; flex-direction: column; height: 1rem; justify-content: space-between; width: 1.2rem; div { border: 1px solid #aaa; transition: border-color 0.5s, transform 0.5s; } .nav-toggle:checked ~ & div { border-color: transparent; &:first-child { border-color: #aaa; transform: translateY(0.5rem) translateY(-1px) rotate(45deg) scaleX(141%); } &:last-child { border-color: #aaa; transform: translateY(-0.5rem) translateY(1px) rotate(-45deg) scaleX(141%); } } @media screen and (min-width: $small) { display: none; } } .nav-toggle { display: none; }