// Normalize *, *::before, *::after { box-sizing: border-box; } html, body { width: 100%; height: 100%; min-height: 100%; margin: 0; font-family: 'Lato', sans-serif; font-size: 20px; line-height: 1; } // Typography p { margin: 0; } p + p { margin-top: 0.5rem; } $base-font-size: 16px; $heading-scale: 1.25; @function pow($number, $exponent) { $value: 1; @if $exponent > 0 { @for $i from 1 through $exponent { $value: $value * $number; } } @return $value; } @for $i from 1 through 4 { h#{$i} { margin: 0; $factor: pow($heading-scale, 4 - $i); font-size: $base-font-size * $factor; font-weight: 500; &:not(:first-child) { padding-top: 0.5rem * $factor; } line-height: 1; } } $device-s-width: 640px; // Not on mobile @media screen and (min-width: $device-s-width) and (pointer: fine) { // ... } // On mobile @media screen and (max-width: $device-s-width), (pointer: coarse) { // ... } // // Components // .text-body { font-family: 'EB Garamond', serif; font-weight: 400; font-size: 21px; line-height: 1.41; b, strong { font-weight: 600; } } // // Structure // body { display: flex; flex-direction: column; align-items: center; background: #f8f8f8; main { padding: 1rem; width: 100%; display: flex; flex-direction: column; align-items: center; } } .logo { // font-size: 42px; // font-family: 'EB Garamond'; // font-weight: 600; font-size: 38px; font-family: 'Lato'; font-weight: 300; } main.home { padding-top: 2rem; gap: 2rem; } main.new-solution { padding-top: 2rem; gap: 2rem; .solution-editor { display: grid; width: 100%; grid-template-columns: repeat(2, 1fr); gap: 1rem; .editor, .preview { width: 100%; max-width: 70ch; display: flex; flex-direction: column; align-items: center; gap: 1rem; } .editor { justify-self: end; textarea { font-family: 'DM Mono', monospace; font-size: 18px; border: none; outline: gray; width: 100%; padding: 1rem; box-shadow: -2px 4px 8px 1px #00000020, -1px 1px 1px 0px #00000010; border-radius: 0.25rem; background: #ffffff; resize: none; overflow-y: hidden; min-height: 10rem; } } .preview { justify-self: start; .placeholder { color: #444; } .preview-content { @extend .text-body; width: 100%; padding: 1rem; box-shadow: -2px 4px 8px 1px #00000020, -1px 1px 1px 0px #00000010; border-radius: 0.25rem; background: #ffffff; } } } } .board { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(50ch, 1fr)); grid-auto-rows: 3rem; gap: 1rem; } // // Components // .problem { padding: 1rem; // border: 1px solid #ddd; box-shadow: -2px 4px 8px 1px #00000020, -1px 1px 1px 0px #00000010; border-radius: 0.25rem; background: #ffffff; grid-row: span var(--size); overflow-y: auto; display: grid; grid-template-rows: auto 1fr; gap: 0.5rem; .problem-header { display: grid; grid-template-columns: auto; .problem-title { font-size: 24px; font-weight: 700; } } .problem-content { @extend .text-body; } } .math-inline { font-size: 95%; }