@font-face { font-family: "Lexend"; font-display: swap; font-weight: 400; src: url("https://gleam.run/fonts/Lexend.woff2") format("woff2"); } @font-face { font-family: "Lexend"; font-display: swap; font-weight: 700; src: url("https://gleam.run/fonts/Lexend-700.woff2") format("woff2"); } @font-face { font-family: "Outfit"; font-display: swap; src: url("https://gleam.run/fonts/Outfit.woff") format("woff"); } :root { --font-family-normal: "Outfit", sans-serif; --font-family-title: "Lexend", sans-serif; --gap: 0.75rem; --gap-double: calc(2 * var(--gap)); --gap-triple: calc(3 * var(--gap)); --gap-quad: calc(4 * var(--gap)); --gap-half: calc(0.5 * var(--gap)); --gap-quarter: calc(0.25 * var(--gap)); --navbar-height: calc(var(--gap-double) + 20px); --color-navbar-background: var(--faff-pink); --color-navbar-text: var(--light-theme-text); --color-navbar-link: var(--light-theme-text); } html.theme-light { --color-background: var(--light-theme-background); --color-background-dim: var(--light-theme-background-dim); --color-text: var(--light-theme-text); --color-text-secondary: var(--light-theme-text-secondary); --color-link: var(--light-theme-text); --color-link-decoration: var(--faff-pink); --color-code: var(--light-theme-code); --color-divider: var(--faff-pink); color-scheme: light; } html.theme-dark { --color-background: var(--dark-theme-background); --color-background-dim: var(--dark-theme-background-dim); --color-text: var(--dark-theme-text); --color-text-secondary: var(--dark-theme-text-secondary); --color-link: var(--dark-theme-text); --color-link-decoration: var(--faff-pink); --color-code: var(--dark-theme-code); --color-divider: var(--unexpected-aubergine); color-scheme: dark; } * { box-sizing: border-box; } body { margin: 0; padding: 0; height: 100vh; display: flex; flex-direction: column; background-color: var(--color-background); font-family: var(--font-family-normal); letter-spacing: 0.01em; color: var(--color-text); } .codeflask__textarea, pre, code { font-weight: normal; letter-spacing: initial; } p { margin: var(--gap) 0 !important; font-size: 1rem; line-height: var(--gap-double); font-weight: 400; } p code { padding: 1px 2px; color: var(--color-code); background-color: var(--color-background-dim); } h1, h2, h3, h4, h5, h6 { font-family: var(--font-family-title); font-weight: normal; } .navbar { display: flex; justify-content: space-between; align-items: center; height: var(--navbar-height); z-index: 100; position: fixed; inset: 0; bottom: unset; padding: var(--gap); background: var(--color-navbar-background); color: var(--color-navbar-text); box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.1); } a { color: var(--color-link); text-decoration-color: var(--color-link-decoration); } a code { color: inherit; } .navbar .logo { display: flex; align-items: center; } .navbar .logo img { display: inline-block; height: 2em; transform: rotate(-10deg); margin-right: 0.5em; } .navbar a:visited, .navbar a { text-decoration: none; color: var(--color-navbar-link); } .navbar .nav-right { display: flex; align-items: center; gap: 1em; } html.theme-dark .theme-button.-dark { display: none; } html.theme-light .theme-button.-light { display: none; } .theme-button { appearance: none; margin: 0; border: 0; padding: 0; background: none; color: inherit; display: flex; gap: 0.25em; font-size: inherit; color: inherit; } .theme-button svg { display: inline-block; fill: currentColor; height: 1em; width: 1em; } #left, #output, #editor { min-height: 200px; overflow-y: auto; border-bottom: 2px solid var(--color-divider); margin: 0; overflow-wrap: break-word; } #left > :first-child { margin-top: 0; } #editor { position: relative; } #playground { padding-top: var(--navbar-height); } @media (min-width: 600px) { #playground { position: fixed; top: var(--navbar-height); bottom: 0; left: 0; right: 0; padding-top: 0; } #left, #right { width: 50vw; position: absolute; top: 0; bottom: 0; } #left { border-right: 2px solid var(--color-divider); } #right { right: 0; } #right > :first-child { height: 62%; } #right > :last-child { height: 38%; } } #left, #output > *, #editor .codeflask__flatten { padding: var(--gap); } #output > * { margin: 0; white-space: pre-wrap; } .error, .warning { border-width: var(--gap); border-style: solid; border-top: 0; border-bottom: 0; } .error { border-color: var(--brand-error); } .warning { border-color: var(--brand-warning); } .prev-next { display: flex; justify-content: center; align-items: center; padding: 0 var(--gap); gap: 0.5em; } .prev-next span { opacity: 0.5; } .mb-0 { margin-bottom: 0; } /* * CodeFlask editor themes based on the Atom One highlight.js theme used in Gleam package docs sites. */ .codeflask .codeflask__textarea { color: var( --color-background ); /* Prevents rendering artifacts in dark mode */ caret-color: var( --color-text ); /* Makes the text input cursor visible in dark mode */ } /* CodeFlask light theme */ html.theme-light .codeflask { background: var(--color-background); color: var(--color-text); } html.theme-light .codeflask .token.punctuation { color: #383a42; } html.theme-light .codeflask .token.keyword { color: #a626a4; } html.theme-light .codeflask .token.operator { color: #383a42; } html.theme-light .codeflask .token.string { color: #50a14f; } html.theme-light .codeflask .token.comment { color: #a0a1a7; } html.theme-light .codeflask .token.function { color: #986801; } html.theme-light .codeflask .token.boolean { color: #986801; } html.theme-light .codeflask .token.number { color: #986801; } html.theme-light .codeflask .token.selector { color: #986801; } html.theme-light .codeflask .token.property { color: #986801; } html.theme-light .codeflask .token.tag { color: #383a42; } html.theme-light .codeflask .token.attr-value { color: #383a42; } /* CodeFlask dark theme */ html.theme-dark .codeflask { background: var(--color-background); color: #d19a66; } html.theme-dark .codeflask .token.punctuation { color: #abb2bf; } html.theme-dark .codeflask .token.keyword { color: #c678dd; } html.theme-dark .codeflask .token.operator { color: #abb2bf; } html.theme-dark .codeflask .token.string { color: #98c379; } html.theme-dark .codeflask .token.comment { color: #5c6370; } html.theme-dark .codeflask .token.function { color: #61aeee; } html.theme-dark .codeflask .token.boolean { color: #61aeee; } html.theme-dark .codeflask .token.number { color: #d19a66; } html.theme-dark .codeflask .token.selector { color: #d19a66; } html.theme-dark .codeflask .token.property { color: #d19a66; } html.theme-dark .codeflask .token.tag { color: #abb2bf; } html.theme-dark .codeflask .token.attr-value { color: #abb2bf; } /* everything wrapper, 2x2 responsive grid layout */ main#everything { display: grid; max-height: 100vh; grid-template-columns: minmax(0, max-content) 1fr; padding-top: var(--navbar-height); overflow: hidden; } #everything h1, #everything h2, #everything h3 { margin: 0; } /* table of contents on the left, scrollable */ #everything-contents, #everything-lessons { grid-column-end: span 1; grid-row: 1 / span 1; padding: var(--gap); padding-bottom: var(--gap-double); overflow-y: auto; display: flex; background: var(--color-background); flex-direction: column; } #everything-contents { grid-column-start: 1; background: var(--color-background-dim); padding-bottom: var(--gap-quad); gap: var(--gap-double); } #everything-contents * { margin: 0; } #everything-contents .chapter { display: flex; flex-direction: column; gap: var(--gap); } #everything-contents .chapter h3 { white-space: nowrap; } #everything-contents .chapter ul, #everything-contents .chapter li { list-style: none; padding: 0; color: var(--color-text-secondary); } #everything-contents .chapter ul { display: flex; flex-direction: column; gap: var(--gap-half); } #everything-contents a { color: var(--color-text-secondary); transition: color 150ms ease-out 0s; } #everything-contents a:hover { color: var(--color-link); } #everything-lessons { grid-column-start: 2; container-type: inline-size; container-name: lessons-list; padding-top: 0; } #everything-lessons .chapter-title { margin: 0; padding-top: var(--gap); color: var(--faff-pink); position: sticky; height: var(--gap-triple); top: 0; background: var(--color-background); z-index: 2; } #everything-lessons .chapter-title:first-child { margin-top: 0; } #everything-lessons .lesson { margin: var(--gap) 0; padding: var(--gap) 0; } #everything-lessons .lesson * { margin: 0; } #everything-lessons .lesson-title { position: sticky; top: var(--gap-triple); background: var(--color-background); z-index: 1; padding: var(--gap) 0; } #everything-lessons .lesson-snippet { padding: var(--gap) var(--gap-half); margin-top: var(--gap-double); background: var(--color-background-dim); position: relative; } #everything-lessons .lesson-snippet-link { background: var(--color-background); position: absolute; top: var(--gap-half); right: var(--gap-half); padding: var(--gap-half); display: flex; align-items: center; justify-content: center; gap: var(--gap); font-size: 0.75rem; line-height: 0.75rem; color: var(--color-link); border-radius: none; text-decoration: none; outline: 1px solid transparent; outline-offset: -1px; cursor: pointer; transition: all 300ms ease-out 0s; } #everything-lessons .lesson-snippet-link:hover { color: var(--color-background); background: var(--color-link); transition: all 120ms ease-in 0s; outline-color: var(--faff-pink); } #everything-lessons .snippet-link-icon { color: var(--faff-pink); font-weight: bold; text-decoration: none !important; } #everything-lessons hr { width: 100%; height: 1px; border: 0; padding: 0; margin: 0; display: block; } #everything-lessons .lesson-separator { border-top: 1px solid var(--color-background-dim); } #everything-lessons .chapter-separator { border-top: 1px solid var(--faff-pink); position: sticky; top: calc(var(--gap-triple) - 1px); z-index: 2; } @media only screen and (min-width: 1100px) { #everything { grid-template-columns: minmax(min-content, max-content) 1fr; } #everything-contents { padding: var(--gap) var(--gap-double) var(--gap-quad) var(--gap); } #everything-contents .chapter ul { padding-left: var(--gap); } } @media only screen and (max-width: 768px) { #everything-contents { display: none; } #everything-lessons { grid-column: 1 / span 2; } } @container lessons-list (min-width: 900px) { #everything-lessons .lesson, #everything-lessons .chapter-title { padding-right: var(--gap-quad); padding-left: var(--gap-quad); } #everything-lessons .chapter-separator { margin-left: var(--gap-double); margin-right: var(--gap-double); width: calc(100% - var(--gap-quad)); } }