Files
Decodal/site/decodal-site/src/style.css
T

1345 lines
22 KiB
CSS

:root {
color-scheme: light;
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
font-synthesis: none;
--font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
--font-code: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
--canvas: #f6f7f8;
--surface: #ffffff;
--surface-subtle: #f1f3f4;
--surface-hover: #e8eaed;
--text: #202124;
--heading: #171717;
--muted: #5f6368;
--subtle: #80868b;
--border: #dadce0;
--border-strong: #bdc1c6;
--accent: #1a73e8;
--accent-hover: #1557b0;
--accent-soft: #e8f0fe;
--accent-text: #174ea6;
--danger: #b3261e;
--danger-soft: #fce8e6;
--error: #b3261e;
--selection: #d2e3fc;
--code-surface: #fafafa;
--inline-code-text: #3c4043;
--syntax-keyword: #174ea6;
--syntax-type: #007b83;
--syntax-literal: #9c4f00;
--syntax-string: #137333;
--syntax-comment: #6f7378;
--syntax-operator: #8430a5;
--on-accent: #ffffff;
--radius-control: 4px;
--radius-panel: 6px;
--header-height: 56px;
--sidebar-width: 288px;
--content-width: 1200px;
--reading-width: 820px;
}
@media (prefers-color-scheme: dark) {
:root {
color-scheme: dark;
--canvas: #101214;
--surface: #16181b;
--surface-subtle: #202328;
--surface-hover: #292d32;
--text: #d6d9de;
--heading: #f1f3f4;
--muted: #aeb4bc;
--subtle: #8b929a;
--border: #34383e;
--border-strong: #555b63;
--accent: #8ab4f8;
--accent-hover: #aecbfa;
--accent-soft: #223853;
--accent-text: #aecbfa;
--danger: #f28b82;
--danger-soft: #462426;
--error: #f28b82;
--selection: #3c526f;
--code-surface: #121416;
--inline-code-text: #e8eaed;
--syntax-keyword: #8ab4f8;
--syntax-type: #78d9ec;
--syntax-literal: #fdd663;
--syntax-string: #81c995;
--syntax-comment: #9aa0a6;
--syntax-operator: #d7aefb;
--on-accent: #202124;
}
}
* {
box-sizing: border-box;
}
html {
background: var(--surface);
scroll-behavior: smooth;
}
body {
background: var(--surface);
color: var(--text);
display: flex;
flex-direction: column;
line-height: 1.6;
margin: 0;
min-height: 100vh;
min-height: 100svh;
text-rendering: optimizeLegibility;
}
::selection {
background: var(--selection);
}
a {
color: var(--accent);
text-decoration: none;
}
a:hover {
color: var(--accent-hover);
text-decoration: underline;
text-underline-offset: 0.18em;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
code,
pre {
font-family: var(--font-code);
}
.topbar {
align-items: stretch;
background: var(--surface);
border-bottom: 1px solid var(--border);
display: flex;
flex: 0 0 var(--header-height);
height: var(--header-height);
justify-content: space-between;
padding: 0 24px;
position: relative;
z-index: 10;
}
.brand {
align-items: baseline;
align-self: center;
color: var(--heading);
display: flex;
gap: 12px;
min-width: 0;
}
.brand:hover {
color: var(--heading);
text-decoration: none;
}
.brand strong {
font-size: 18px;
letter-spacing: -0.02em;
}
.brand span {
color: var(--muted);
font-size: 12px;
white-space: nowrap;
}
.topnav {
align-items: stretch;
display: flex;
gap: 4px;
}
.topnav a {
align-items: center;
border-bottom: 2px solid transparent;
color: var(--muted);
display: flex;
font-size: 14px;
font-weight: 600;
padding: 2px 12px 0;
}
.topnav a:hover {
background: var(--surface-subtle);
color: var(--text);
text-decoration: none;
}
.topnav a.current {
border-bottom-color: var(--accent);
color: var(--accent-text);
}
.site-footer {
align-items: center;
background: var(--surface);
border-top: 1px solid var(--border);
color: var(--muted);
display: flex;
flex: 0 0 auto;
font-size: 12px;
gap: 10px;
justify-content: center;
min-height: 48px;
padding: 12px 24px;
}
.layout {
display: grid;
flex: 1 0 auto;
grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
min-height: 0;
}
.wide-layout {
display: block;
}
.playground-layout {
flex: 1 1 auto;
min-height: 0;
}
.sidebar {
background: var(--canvas);
border-right: 1px solid var(--border);
}
.sidebar-content {
padding: 24px 20px 28px;
position: sticky;
top: var(--sidebar-sticky-top, 16px);
}
.sidebar-title {
color: var(--heading);
display: block;
font-size: 13px;
font-weight: 700;
letter-spacing: 0.06em;
margin: 0 8px 12px;
text-transform: uppercase;
}
.nav-tree {
list-style: none;
margin: 0;
padding: 0;
}
.nav-tree .nav-tree {
border-left: 1px solid var(--border);
margin: 3px 0 6px 15px;
padding-left: 5px;
}
.nav-tree a {
border-left: 2px solid transparent;
border-radius: 0 var(--radius-control) var(--radius-control) 0;
color: var(--muted);
display: flex;
font-size: 13px;
gap: 6px;
line-height: 1.35;
padding: 5px 8px 5px 7px;
}
.nav-tree a:hover {
background: var(--surface-hover);
color: var(--text);
text-decoration: none;
}
.nav-number {
color: var(--subtle);
flex: 0 0 auto;
font-variant-numeric: tabular-nums;
}
.nav-tree a.active {
background: var(--accent-soft);
border-left-color: var(--accent);
color: var(--accent-text);
font-weight: 650;
}
.nav-tree a.active .nav-number {
color: var(--accent-text);
}
main {
background: var(--surface);
min-width: 0;
padding: 48px clamp(28px, 5vw, 72px) 64px;
}
.markdown {
margin: 0 auto;
max-width: var(--reading-width);
}
.markdown > :first-child {
margin-top: 0;
}
.markdown > :last-child {
margin-bottom: 0;
}
.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4 {
color: var(--heading);
line-height: 1.25;
scroll-margin-top: 24px;
}
.markdown h1 {
font-size: clamp(2rem, 4vw, 2.5rem);
letter-spacing: -0.035em;
margin: 0 0 24px;
}
.markdown h2 {
border-top: 1px solid var(--border);
font-size: 1.45rem;
letter-spacing: -0.02em;
margin: 44px 0 14px;
padding-top: 24px;
}
.markdown h3 {
font-size: 1.1rem;
margin: 28px 0 10px;
}
.markdown p,
.markdown li {
line-height: 1.75;
}
.markdown ul,
.markdown ol {
padding-left: 1.5rem;
}
.markdown li + li {
margin-top: 0.25rem;
}
.markdown pre,
.output-pane pre,
.code-block {
background: var(--code-surface);
border: 1px solid var(--border-strong);
border-radius: var(--radius-panel);
color: var(--text);
font-size: 13.5px;
line-height: 1.6;
overflow: auto;
padding: 16px 18px;
tab-size: 4;
}
.markdown pre {
margin: 20px 0;
}
.markdown code {
font-family: var(--font-code);
}
.markdown :not(pre) > code {
background: var(--surface-subtle);
border: 1px solid var(--border);
border-radius: 3px;
color: var(--inline-code-text);
font-size: 0.9em;
padding: 0.08em 0.3em;
}
.markdown blockquote {
border-left: 3px solid var(--border-strong);
color: var(--muted);
margin: 24px 0;
padding: 1px 0 1px 18px;
}
.markdown table {
border-collapse: collapse;
display: block;
margin: 24px 0;
overflow-x: auto;
width: 100%;
}
.markdown th,
.markdown td {
border: 1px solid var(--border);
padding: 9px 12px;
text-align: left;
vertical-align: top;
}
.markdown th {
background: var(--surface-subtle);
color: var(--heading);
font-size: 13px;
font-weight: 700;
}
.markdown hr {
border: 0;
border-top: 1px solid var(--border);
margin: 40px 0;
}
.tok-keyword {
color: var(--syntax-keyword);
font-weight: 700;
}
.tok-type {
color: var(--syntax-type);
}
.tok-literal,
.tok-number {
color: var(--syntax-literal);
}
.tok-string,
.tok-regex {
color: var(--syntax-string);
}
.tok-comment {
color: var(--syntax-comment);
font-style: italic;
}
.tok-operator {
color: var(--syntax-operator);
}
button,
.button {
align-items: center;
background: var(--accent);
border: 1px solid var(--accent);
border-radius: var(--radius-control);
color: var(--on-accent);
cursor: pointer;
display: inline-flex;
font-family: var(--font-ui);
font-size: 13px;
font-weight: 650;
justify-content: center;
min-height: 34px;
padding: 6px 13px;
}
button:hover,
.button:hover {
background: var(--accent-hover);
border-color: var(--accent-hover);
color: var(--on-accent);
text-decoration: none;
}
button:disabled {
cursor: not-allowed;
opacity: 0.5;
}
.secondary-button {
background: var(--surface);
border-color: var(--border-strong);
color: var(--text);
}
.secondary-button:hover {
background: var(--surface-subtle);
border-color: var(--border-strong);
color: var(--text);
}
select {
background: var(--surface);
border: 1px solid var(--border-strong);
border-radius: var(--radius-control);
color: var(--text);
font-family: var(--font-ui);
min-height: 34px;
padding: 5px 30px 5px 9px;
}
/* Front page */
main.frontpage {
padding: 0;
}
.frontpage section {
margin: 0 auto;
max-width: var(--content-width);
padding: 64px clamp(24px, 5vw, 64px);
}
.frontpage .home-intro {
display: grid;
gap: clamp(40px, 6vw, 84px);
grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
padding-bottom: 72px;
padding-top: 72px;
}
.home-intro h1 {
color: var(--heading);
font-size: clamp(2.5rem, 5vw, 4rem);
letter-spacing: -0.055em;
line-height: 1.03;
margin: 0;
max-width: 660px;
}
.home-lead {
color: var(--muted);
font-size: 1.05rem;
line-height: 1.75;
margin: 24px 0 0;
max-width: 640px;
}
.home-actions {
align-items: center;
display: flex;
flex-wrap: wrap;
gap: 18px;
margin-top: 28px;
}
.home-actions .button {
min-height: 40px;
padding: 8px 16px;
}
.text-action {
font-size: 14px;
font-weight: 650;
}
.home-facts {
border-top: 1px solid var(--border);
display: grid;
gap: 0;
grid-template-columns: repeat(3, minmax(0, 1fr));
margin: 38px 0 0;
padding-top: 18px;
}
.home-facts div {
min-width: 0;
padding-right: 12px;
}
.home-facts dt {
color: var(--subtle);
font-size: 11px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.home-facts dd {
color: var(--text);
font-size: 13px;
margin: 4px 0 0;
}
.home-facts code {
font-size: inherit;
}
.home-code {
align-self: center;
background: var(--code-surface);
border: 1px solid var(--border-strong);
border-radius: var(--radius-panel);
min-width: 0;
overflow: hidden;
}
.code-caption {
align-items: center;
background: var(--surface-subtle);
border-bottom: 1px solid var(--border);
color: var(--muted);
display: flex;
font-family: var(--font-code);
font-size: 11px;
justify-content: space-between;
min-height: 36px;
padding: 0 14px;
text-transform: uppercase;
}
.home-code > .code-block {
background: transparent;
border: 0;
border-radius: 0;
margin: 0;
min-height: 276px;
padding: 20px 22px;
}
.materialized-result {
align-items: start;
background: var(--surface-subtle);
border-top: 1px solid var(--border);
display: grid;
gap: 16px;
grid-template-columns: 90px minmax(0, 1fr);
padding: 14px;
}
.materialized-result > span {
color: var(--muted);
font-family: var(--font-code);
font-size: 11px;
padding-top: 3px;
text-transform: uppercase;
}
.materialized-result pre {
font-size: 12px;
line-height: 1.55;
margin: 0;
overflow-x: auto;
}
.frontpage .home-section {
border-top: 1px solid var(--border);
padding-bottom: 72px;
padding-top: 64px;
}
.section-heading {
max-width: 760px;
}
.section-heading h2 {
color: var(--heading);
font-size: clamp(1.8rem, 3vw, 2.4rem);
letter-spacing: -0.04em;
line-height: 1.15;
margin: 0;
}
.section-heading > p:last-child {
color: var(--muted);
line-height: 1.75;
margin: 18px 0 0;
}
.definition-list {
border-top: 1px solid var(--border-strong);
margin-top: 36px;
}
.definition-list article {
border-bottom: 1px solid var(--border);
display: grid;
gap: 22px;
grid-template-columns: 84px minmax(0, 1fr);
padding: 22px 0;
}
.definition-list article > code {
color: var(--accent-text);
font-size: 16px;
font-weight: 700;
padding-top: 1px;
}
.definition-list h3 {
color: var(--heading);
font-size: 1rem;
margin: 0;
}
.definition-list p {
color: var(--muted);
font-size: 14px;
line-height: 1.65;
margin: 4px 0 0;
}
.evaluation-flow {
border: 1px solid var(--border-strong);
border-radius: var(--radius-panel);
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
list-style: none;
margin: 36px 0 0;
padding: 0;
}
.evaluation-flow li {
display: flex;
flex-direction: column;
min-height: 150px;
padding: 18px;
}
.evaluation-flow li + li {
border-left: 1px solid var(--border);
}
.evaluation-flow li > span {
color: var(--subtle);
font-family: var(--font-code);
font-size: 12px;
margin-bottom: 28px;
}
.evaluation-flow strong {
color: var(--heading);
font-size: 14px;
}
.evaluation-flow small {
color: var(--muted);
font-size: 12px;
line-height: 1.5;
margin-top: 5px;
}
.section-link {
font-size: 14px;
font-weight: 650;
margin: 24px 0 0;
}
.package-rows {
border-top: 1px solid var(--border-strong);
margin-top: 36px;
}
.package-rows article {
align-items: baseline;
border-bottom: 1px solid var(--border);
display: grid;
gap: 24px;
grid-template-columns: minmax(200px, 0.75fr) minmax(280px, 1.5fr) minmax(100px, 0.5fr);
padding: 18px 0;
}
.package-rows article > div {
align-items: baseline;
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.package-rows code {
color: var(--heading);
font-size: 14px;
font-weight: 700;
}
.package-rows article > div span {
color: var(--subtle);
font-size: 11px;
font-weight: 700;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.package-rows p {
color: var(--muted);
font-size: 14px;
margin: 0;
}
.package-rows article > a,
.package-links {
font-size: 13px;
font-weight: 650;
}
.package-links {
display: flex;
gap: 12px;
}
/* Playground */
main.playground {
background: var(--surface);
height: calc(100svh - var(--header-height));
overflow: hidden;
padding: 0;
}
.playground-page {
display: flex;
flex-direction: column;
height: 100%;
min-height: 0;
}
.playground-header {
align-items: center;
background: var(--surface-subtle);
border-bottom: 1px solid var(--border-strong);
display: flex;
flex: 0 0 auto;
gap: 12px;
justify-content: space-between;
min-height: 42px;
padding: 6px 10px;
}
.playground-actions {
align-items: center;
display: flex;
flex-wrap: wrap;
gap: 6px 12px;
justify-content: flex-end;
margin-left: auto;
}
.action-group {
align-items: center;
display: flex;
gap: 6px;
}
.example-picker,
.entry-picker {
align-items: center;
color: var(--muted);
display: flex;
font-size: 11px;
font-weight: 700;
gap: 5px;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.example-picker select,
.entry-picker select {
font-size: 12px;
font-weight: 500;
min-width: 160px;
text-transform: none;
}
.entry-picker select {
max-width: 220px;
}
.status {
color: var(--muted);
font-size: 11px;
margin: 0;
white-space: nowrap;
}
.playground button,
.playground select {
min-height: 28px;
}
.playground button {
padding: 3px 10px;
}
.playground select {
padding: 3px 26px 3px 7px;
}
.playground-shell {
display: grid;
flex: 1 1 auto;
gap: 0;
grid-template-columns: 200px minmax(380px, 1.25fr) minmax(320px, 1fr);
min-height: 0;
}
.file-panel,
.pane {
background: var(--surface);
border: 0;
border-radius: 0;
display: flex;
flex-direction: column;
min-height: 0;
overflow: hidden;
}
.file-panel,
.input-pane {
border-right: 1px solid var(--border-strong);
}
.panel-header,
.pane > span {
align-items: center;
background: var(--surface-subtle);
border-bottom: 1px solid var(--border);
color: var(--muted);
display: flex;
font-size: 11px;
font-weight: 700;
justify-content: space-between;
letter-spacing: 0.04em;
min-height: 32px;
padding: 0 8px;
text-transform: uppercase;
}
.panel-header button {
background: var(--accent);
border-color: var(--accent);
border-radius: 0;
height: 16px;
min-height: 16px;
padding: 0;
position: relative;
width: 32px;
}
.panel-header button::before,
.panel-header button::after {
background: var(--on-accent);
content: '';
left: 50%;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
}
.panel-header button::before {
height: 2px;
width: 8px;
}
.panel-header button::after {
height: 8px;
width: 2px;
}
.panel-header button:hover {
background: var(--accent-hover);
border-color: var(--accent-hover);
}
.new-file-control {
display: flex;
justify-content: flex-end;
margin: 0;
min-width: 0;
}
.new-file-input {
background: var(--surface);
border: 1px solid var(--accent);
border-radius: 0;
color: var(--text);
display: none;
font-family: var(--font-code);
font-size: 11px;
height: 24px;
min-width: 0;
padding: 2px 5px;
width: 136px;
}
.new-file-control.editing button {
display: none;
}
.new-file-control.editing .new-file-input {
display: block;
}
.file-tree {
flex: 1;
min-height: 0;
overflow: auto;
padding: 4px;
}
.file-tree ul {
list-style: none;
margin: 0;
padding-left: 12px;
}
.file-tree > ul {
padding-left: 0;
}
.file-tree li {
margin: 1px 0;
}
.file-tree .file-row {
align-items: center;
display: flex;
position: relative;
}
.file-tree .folder {
color: var(--muted);
display: block;
font-size: 12px;
font-weight: 650;
padding: 2px 6px;
}
.file-tree .file {
background: transparent;
border: 0;
border-radius: var(--radius-control);
color: var(--text);
display: block;
font-family: var(--font-code);
font-size: 12px;
font-weight: 500;
min-height: 24px;
padding: 2px 26px 2px 6px;
text-align: left;
width: 100%;
}
.file-tree .file:hover,
.file-tree .file.active {
background: var(--accent-soft);
color: var(--accent-text);
text-decoration: none;
}
.playground .file-delete {
align-items: center;
background: transparent;
border: 2px solid var(--danger);
border-radius: 50%;
display: flex;
height: 16px;
justify-content: center;
min-height: 16px;
opacity: 0;
padding: 0;
pointer-events: none;
position: absolute;
right: 5px;
top: 50%;
transform: translateY(-50%);
width: 16px;
}
.playground .file-delete::before {
background: var(--danger);
content: '';
display: block;
height: 2px;
width: 8px;
}
.file-row:hover .file-delete,
.file-row:focus-within .file-delete {
opacity: 1;
pointer-events: auto;
}
.playground .file-delete:hover {
background: var(--danger-soft);
border-color: var(--danger);
}
@media (hover: none) {
.playground .file-delete {
opacity: 1;
pointer-events: auto;
}
}
.code-editor {
background: #202124;
flex: 1;
min-height: 0;
}
.code-editor .cm-editor {
height: 100%;
}
.code-editor .cm-line {
padding: 0;
}
.code-editor .cm-activeLine {
background: rgb(66 133 244 / 0.12);
}
.code-editor .cm-activeLineGutter {
background: rgb(66 133 244 / 0.18);
}
.output-pane pre {
background: var(--surface);
border: 0;
border-radius: 0;
flex: 1;
font-size: 12px;
margin: 0;
min-height: 0;
padding: 10px;
}
.output-pane pre.error {
color: var(--error);
}
@media (max-width: 1080px) {
.frontpage .home-intro {
gap: 48px;
grid-template-columns: minmax(0, 0.9fr) minmax(400px, 1.1fr);
}
.playground-actions {
gap: 8px;
}
}
@media (max-width: 900px) {
.layout {
grid-template-columns: 1fr;
}
.sidebar {
border-bottom: 1px solid var(--border);
border-right: 0;
max-height: 240px;
overflow: auto;
}
.sidebar-content {
padding: 18px 20px;
position: static;
}
main {
padding: 40px 28px 56px;
}
.frontpage .home-intro {
grid-template-columns: 1fr;
}
.home-code {
max-width: 680px;
width: 100%;
}
.evaluation-flow {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.evaluation-flow li:nth-child(3) {
border-left: 0;
border-top: 1px solid var(--border);
}
.evaluation-flow li:nth-child(4) {
border-top: 1px solid var(--border);
}
main.playground {
height: auto;
min-height: calc(100svh - var(--header-height));
overflow: visible;
}
.playground-page {
height: auto;
}
.playground-header {
flex-wrap: wrap;
}
.playground-actions {
justify-content: flex-start;
width: 100%;
}
.playground-shell {
flex: none;
grid-template-columns: 1fr;
grid-template-rows: 180px 520px 360px;
}
.file-panel,
.input-pane {
border-bottom: 1px solid var(--border-strong);
border-right: 0;
}
}
@media (max-width: 640px) {
.topbar {
padding: 0 12px;
}
.brand span {
display: none;
}
.topnav {
gap: 0;
}
.topnav a {
font-size: 13px;
padding-left: 8px;
padding-right: 8px;
}
.topnav a:last-child {
display: none;
}
.site-footer {
flex-wrap: wrap;
}
main {
padding: 32px 18px 48px;
}
.markdown h1 {
font-size: 2rem;
}
.markdown pre,
.code-block {
font-size: 12.5px;
margin-left: -6px;
margin-right: -6px;
padding: 14px;
}
.frontpage section {
padding-left: 20px;
padding-right: 20px;
}
.frontpage .home-intro {
padding-bottom: 56px;
padding-top: 52px;
}
.home-intro h1 {
font-size: 2.65rem;
}
.home-facts {
gap: 14px;
grid-template-columns: 1fr;
}
.home-code > .code-block {
margin: 0;
min-height: 0;
}
.materialized-result {
grid-template-columns: 1fr;
gap: 6px;
}
.definition-list article {
gap: 8px;
grid-template-columns: 1fr;
}
.evaluation-flow {
grid-template-columns: 1fr;
}
.evaluation-flow li + li,
.evaluation-flow li:nth-child(3),
.evaluation-flow li:nth-child(4) {
border-left: 0;
border-top: 1px solid var(--border);
}
.evaluation-flow li {
min-height: 0;
}
.evaluation-flow li > span {
margin-bottom: 16px;
}
.package-rows article {
gap: 8px;
grid-template-columns: 1fr;
}
main.playground {
padding: 0;
}
.playground-actions,
.action-group {
align-items: stretch;
flex-direction: column;
}
.action-group {
width: 100%;
}
.example-picker,
.entry-picker {
align-items: stretch;
flex-direction: column;
}
.example-picker select,
.entry-picker select {
max-width: none;
width: 100%;
}
.status {
white-space: normal;
}
}