iterate.com / cloud

git clone https://git.iterate.com/repos/cloud

cloud / core / lib / src / theme / plain-page-css.gen.tsmain at aacbc74

// Written by `node core/lib/scripts/plain-page-css.ts` from tokens.css and plain-page.css.
// Edit those, then run it.

/** tokens.css and plain-page.css: the text of a plain page's one `<style>`. */
export const plainPageCss = `:root {
color-scheme: light;
--radius: 0.625rem;
--background: light-dark(oklch(1 0 0), oklch(0.145 0 0));
--foreground: light-dark(oklch(0.145 0 0), oklch(0.985 0 0));
--card: light-dark(oklch(1 0 0), oklch(0.205 0 0));
--card-foreground: light-dark(oklch(0.145 0 0), oklch(0.985 0 0));
--popover: light-dark(oklch(1 0 0), oklch(0.205 0 0));
--popover-foreground: light-dark(oklch(0.145 0 0), oklch(0.985 0 0));
--primary: light-dark(oklch(0.205 0 0), oklch(0.922 0 0));
--primary-foreground: light-dark(oklch(0.985 0 0), oklch(0.205 0 0));
--secondary: light-dark(oklch(0.97 0 0), oklch(0.269 0 0));
--secondary-foreground: light-dark(oklch(0.205 0 0), oklch(0.985 0 0));
--muted: light-dark(oklch(0.97 0 0), oklch(0.269 0 0));
--muted-foreground: light-dark(oklch(0.556 0 0), oklch(0.708 0 0));
--accent: light-dark(oklch(0.97 0 0), oklch(0.269 0 0));
--accent-foreground: light-dark(oklch(0.205 0 0), oklch(0.985 0 0));
--destructive: light-dark(oklch(0.577 0.245 27.325), oklch(0.704 0.191 22.216));
--success: light-dark(oklch(0.508 0.118 165.612), oklch(0.765 0.177 163.223));
--warning: light-dark(oklch(0.555 0.163 48.998), oklch(0.828 0.189 84.429));
--info: light-dark(oklch(0.5 0.134 242.749), oklch(0.746 0.16 232.661));
--border: light-dark(oklch(0.922 0 0), oklch(1 0 0 / 10%));
--input: light-dark(oklch(0.922 0 0), oklch(1 0 0 / 15%));
--ring: light-dark(oklch(0.708 0 0), oklch(0.556 0 0));
--link: light-dark(oklch(0.205 0 0), oklch(0.922 0 0));
--cloudflare: #f6821f;
--cloudflare-foreground: oklch(0.145 0 0);
--cloudflare-button: #c65102;
--cloudflare-button-foreground: #fff;
--cloudflare-button-hover: #ad4702;
}
:root.dark {
color-scheme: dark;
}
body {
display: flex;
flex-direction: column;
min-height: 100svh;
margin: 0;
background: var(--muted);
color: var(--foreground);
font-family:
ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
"Noto Color Emoji";
font-size: 0.9375rem;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
main {
box-sizing: border-box;
display: flex;
flex-direction: column;
gap: 1.25rem;
width: calc(100% - 2rem);
max-width: 26rem;
margin: auto;
padding: 2rem;
border: 1px solid var(--border);
border-radius: calc(var(--radius) + 4px);
background: var(--card);
color: var(--card-foreground);
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%);
overflow-wrap: anywhere;
}
main.wide {
max-width: 46rem;
margin: 3rem auto;
}
@media (max-width: 40rem) {
body {
background: var(--card);
}
main,
main.wide {
width: 100%;
max-width: none;
margin: 0;
padding: 2rem 1.25rem 4rem;
border: 0;
border-radius: 0;
box-shadow: none;
}
main.centered {
max-width: 24rem;
margin: 0 auto;
padding-top: 3rem;
}
}
@media (max-width: 40rem), (pointer: coarse) {
input:not([type="checkbox"], [type="radio"], [type="file"], [type="hidden"]),
select,
textarea {
font-size: max(1rem, 16px);
}
}
.mark {
display: flex;
}
.mark svg {
width: 2.25rem;
height: 2.25rem;
border-radius: 22.37%;
}
main.centered {
max-width: 24rem;
gap: 1.5rem;
padding: 2.5rem 2rem 2rem;
}
main.centered > .mark,
main.centered > .tile,
main.centered > .asks,
main.centered > h1 {
align-self: center;
text-align: center;
text-wrap: balance;
}
main.centered > .mark svg,
main.centered > .tile {
width: 2.75rem;
height: 2.75rem;
}
.asks {
display: flex;
align-items: center;
gap: 0.75rem;
}
.asks .mark svg,
.asks .tile {
width: 2.75rem;
height: 2.75rem;
}
.joins {
width: 1.5rem;
border-top: 2px dotted var(--ring);
}
.tile {
box-sizing: border-box;
display: grid;
place-items: center;
border-radius: 22.37%;
overflow: hidden;
border: 1px solid var(--border);
background: var(--card);
color: var(--foreground);
font-size: 1.125rem;
font-weight: 600;
}
.tile svg {
width: 60%;
height: 60%;
}
.tile img {
width: 100%;
height: 100%;
object-fit: contain;
}
.tile.small {
flex: none;
width: 2rem;
height: 2rem;
font-size: 0.75rem;
}
main.centered .stack > button:not(.link) {
min-height: 2.875rem;
font-size: 0.9375rem;
}
main.centered p {
text-wrap: pretty;
}
main.centered > .center {
text-align: center;
}
.mark rect {
fill: var(--foreground);
}
.mark g {
fill: var(--card);
}
h1 {
margin: 0;
font-size: 1.25rem;
font-weight: 600;
line-height: 1.3;
letter-spacing: -0.025em;
}
h2 {
margin: 0;
font-size: inherit;
font-weight: 600;
}
p,
form {
margin: 0;
}
ul {
margin: 0;
padding-left: 1.25rem;
}
ul:empty {
display: none;
}
fieldset {
margin: 0;
padding: 0.75rem 1rem;
border: 1px solid var(--border);
border-radius: var(--radius);
}
legend {
float: left;
width: 100%;
margin-bottom: 0.5rem;
padding: 0;
}
legend + * {
clear: both;
}
label {
display: flex;
flex-direction: column;
gap: 0.375rem;
max-width: 100%;
font-size: 0.875rem;
font-weight: 500;
}
label:has(> input:is([type="checkbox"], [type="radio"])) {
flex-direction: row;
align-items: baseline;
gap: 0.5rem;
}
input,
select,
textarea {
font: inherit;
}
input:not([type="checkbox"], [type="radio"], [type="file"], [type="hidden"]),
select,
textarea {
box-sizing: content-box;
max-width: calc(100% - 1.5rem - 2px);
min-height: 1.5rem;
padding: 0.375rem 0.75rem;
border: 1px solid var(--input);
border-radius: calc(var(--radius) - 2px);
background: transparent;
color: inherit;
}
input.code {
font-size: 1.125rem;
font-variant-numeric: tabular-nums;
letter-spacing: 0.25em;
text-align: center;
}
pre,
code {
font-family:
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
monospace;
font-size: 0.875em;
}
pre {
margin: 0;
padding: 0.75rem;
border-radius: calc(var(--radius) - 2px);
background: var(--muted);
overflow-x: auto;
white-space: pre-wrap;
}
pre code {
font-size: inherit;
}
button {
font: inherit;
}
:not(pre) > code {
background: var(--muted);
padding: 0.125rem 0.3rem;
border-radius: 0.25rem;
}
a,
.link {
color: var(--link);
font-weight: 500;
text-decoration: underline;
text-underline-offset: 4px;
}
button {
min-height: 2.25rem;
padding: 0 1rem;
border: 0;
border-radius: calc(var(--radius) - 2px);
background: var(--primary);
color: var(--primary-foreground);
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
}
button:hover {
background: color-mix(in oklab, var(--primary) 90%, transparent);
}
button.link {
min-height: 0;
padding: 0;
background: none;
font-size: inherit;
}
form.inline {
display: inline;
}
button.secondary {
border: 1px solid var(--input);
background: transparent;
color: var(--foreground);
}
button.secondary:hover {
background: var(--accent);
}
.or {
display: flex;
align-items: center;
gap: 0.75rem;
color: var(--muted-foreground);
font-size: 0.8125rem;
}
.or::before,
.or::after {
flex: 1;
border-top: 1px solid var(--border);
content: "";
}
main:not(.wide) .stack {
align-items: stretch;
}
main:not(.wide) .stack > button:not(.link) {
width: 100%;
}
main:not(.wide) .actions > button:not(.link) {
flex: 1 1 0;
min-width: max-content;
}
main:not(.wide) .actions:has(> button:last-of-type:not(.secondary, .outline, .link)) {
flex-wrap: wrap-reverse;
}
main:not(.wide)
:is(input:not([type="checkbox"], [type="radio"], [type="file"], [type="hidden"]), textarea) {
box-sizing: border-box;
width: 100%;
max-width: none;
min-height: 2.25rem;
}
blockquote {
margin: 0;
padding-left: 0.875rem;
border-left: 2px solid var(--border);
color: var(--muted-foreground);
}
small {
color: var(--muted-foreground);
font-size: 0.8125rem;
}
button.outline {
border: 1px solid var(--border);
background: var(--background);
color: var(--foreground);
}
button.outline:hover {
background: var(--accent);
}
button:has(> svg) {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.625rem;
}
button > svg {
flex: none;
}
:focus-visible {
outline: 2px solid color-mix(in oklab, var(--foreground) 70%, transparent);
outline-offset: 2px;
}
.muted {
color: var(--muted-foreground);
}
[role="alert"] {
color: var(--destructive);
}
.stack {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0.75rem;
}
[role="status"]:empty {
display: none;
}
[hidden] {
display: none !important;
}
.actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.75rem 1.25rem;
}
.facts {
margin: 0;
border: 1px solid var(--border);
border-radius: var(--radius);
font-size: 0.875rem;
}
fieldset > .facts {
margin: 0.5rem 0;
}
.facts > div {
display: grid;
grid-template-columns: 9rem minmax(0, 1fr);
gap: 0.25rem 1rem;
padding: 0.5rem 0.875rem;
}
.facts > div + div {
border-top: 1px solid var(--border);
}
.facts dt {
color: var(--muted-foreground);
}
.facts > div:has(.help[open]) > dt,
.facts > div:has(.help[open]) > dd {
grid-column: 1 / -1;
}
.facts dd {
margin: 0;
overflow-wrap: anywhere;
}
.facts dd.exact {
white-space: pre-wrap;
}
.facts dd > pre {
margin-top: 0.25rem;
}
.facts dd > ul {
margin: 0;
padding-left: 1.125rem;
}
.facts .note {
display: block;
margin-top: 0.125rem;
color: var(--muted-foreground);
}
.help {
display: inline;
}
.help > summary {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.125rem;
height: 1.125rem;
border: 1px solid var(--border);
border-radius: 999px;
color: var(--muted-foreground);
font-size: 0.6875rem;
line-height: 1;
cursor: pointer;
list-style: none;
vertical-align: text-top;
}
.help > summary::-webkit-details-marker {
display: none;
}
.help[open] > summary {
background: var(--muted);
}
.help > p {
margin: 0.25rem 0 0;
color: var(--muted-foreground);
}
@media (max-width: 30rem) {
.facts > div {
grid-template-columns: minmax(0, 1fr);
}
}
.state {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 0.75rem 1rem;
padding: 0.75rem 1rem;
border: 1px solid var(--border);
border-radius: var(--radius);
}
.state > p {
flex: 1 1 14rem;
}
dialog {
box-sizing: border-box;
width: calc(100% - 2rem);
max-width: 28rem;
padding: 1.5rem;
border: 1px solid var(--border);
border-radius: calc(var(--radius) + 4px);
background: var(--card);
color: var(--card-foreground);
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 10%);
overflow-wrap: anywhere;
}
dialog[open] {
display: flex;
flex-direction: column;
gap: 1rem;
}
dialog::backdrop {
background: color-mix(in oklab, var(--foreground) 50%, transparent);
}
dialog li + li {
margin-top: 0.375rem;
}
dialog .actions {
justify-content: flex-end;
}
.page-head {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.session-section {
display: flex;
flex-direction: column;
gap: 0.625rem;
}
.section-head {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 0.5rem 1rem;
}
.section-title {
display: flex;
align-items: center;
gap: 0.5rem;
}
.count {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 1.25rem;
height: 1.25rem;
padding: 0 0.375rem;
border-radius: 999px;
background: var(--muted);
color: var(--muted-foreground);
font-size: 0.75rem;
font-weight: 500;
font-variant-numeric: tabular-nums;
}
button.small {
min-height: 1.75rem;
padding: 0 0.625rem;
border-radius: calc(var(--radius) - 3px);
font-size: 0.8125rem;
white-space: nowrap;
}
.browser-sessions,
.access-list {
list-style: none;
margin: 0;
padding: 0;
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
}
.browser-sessions > li + li,
.access-list > li + li {
border-top: 1px solid var(--border);
}
.browser-row,
.access {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto;
gap: 0.125rem 0.75rem;
align-items: center;
padding: 0.75rem 0.875rem;
}
.browser-row[data-current] {
background: color-mix(in oklab, var(--muted) 60%, transparent);
}
.browser-row > .tile,
.access > .tile {
grid-row: 1 / span 2;
align-self: start;
margin-top: 0.0625rem;
}
.browser-row > form {
grid-column: 3;
grid-row: 1 / span 2;
align-self: center;
}
.access > form {
grid-column: 3;
grid-row: 1;
align-self: start;
}
button.secondary.small {
border-color: var(--border);
background: var(--card);
}
button.secondary.small:hover {
border-color: var(--input);
background: var(--accent);
}
.row-title {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.25rem 0.5rem;
min-width: 0;
line-height: 1.35;
}
.row-title strong {
font-weight: 600;
}
.row-meta {
grid-column: 2;
display: flex;
flex-direction: column;
gap: 0.125rem;
color: var(--muted-foreground);
font-size: 0.8125rem;
line-height: 1.45;
overflow-wrap: anywhere;
}
.meta-line {
margin: -1px;
padding: 1px;
overflow: hidden;
}
.meta-track {
display: flex;
flex-wrap: wrap;
align-items: center;
row-gap: 0.125rem;
margin-left: -0.875rem;
}
.meta-track > * {
position: relative;
margin-left: 0.875rem;
}
.meta-track > .badge + .meta-item {
margin-left: 0.5rem;
}
.meta-item + .meta-item::before {
position: absolute;
left: -0.5625rem;
opacity: 0.5;
content: "·";
}
.badge {
display: inline-flex;
align-items: center;
height: 1.1875rem;
padding: 0 0.4375rem;
border: 1px solid var(--border);
border-radius: calc(var(--radius) - 4px);
background: var(--muted);
color: var(--muted-foreground);
font-size: 0.6875rem;
font-weight: 500;
line-height: 1;
white-space: nowrap;
}
.badge-current,
.badge-strong {
border-color: color-mix(in oklab, var(--foreground) 18%, var(--border));
background: color-mix(in oklab, var(--foreground) 8%, var(--card));
color: var(--foreground);
}
time {
font-variant-numeric: tabular-nums;
}
.access-details {
grid-column: 2 / -1;
margin-top: 0.25rem;
font-size: 0.8125rem;
}
.access-details > summary {
display: inline-flex;
align-items: center;
gap: 0.3125rem;
color: var(--foreground);
font-weight: 500;
cursor: pointer;
list-style: none;
user-select: none;
}
.access-details > summary::-webkit-details-marker {
display: none;
}
.access-details > summary::before {
display: inline-block;
width: 0.375rem;
height: 0.375rem;
border-right: 1.5px solid var(--muted-foreground);
border-bottom: 1.5px solid var(--muted-foreground);
transform: rotate(-45deg);
transition: transform 0.12s ease;
content: "";
}
.access-details[open] > summary::before {
transform: rotate(45deg);
}
.access-details > summary:hover {
text-decoration: underline;
text-underline-offset: 3px;
}
.access-sessions {
list-style: none;
margin: 0.375rem 0 0;
padding: 0.125rem 0.625rem;
border: 1px solid var(--border);
border-radius: calc(var(--radius) - 2px);
background: color-mix(in oklab, var(--muted) 45%, transparent);
}
.access-sessions > li {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem 0.75rem;
padding: 0.375rem 0;
color: var(--muted-foreground);
overflow-wrap: anywhere;
}
.access-sessions > li + li {
border-top: 1px solid var(--border);
}
.access-sessions button.small {
min-height: 1.5rem;
padding: 0 0.5rem;
font-size: 0.75rem;
}
@media (max-width: 34rem) {
.browser-row,
.access {
padding: 0.6875rem 0.75rem;
gap: 0.1875rem 0.625rem;
}
.browser-row > form {
grid-row: 1;
align-self: start;
}
.row-meta {
grid-column: 2 / -1;
}
button.small {
min-height: 1.625rem;
padding: 0 0.5rem;
font-size: 0.75rem;
}
}
.masthead {
display: flex;
align-items: center;
gap: 0.75rem;
}
.masthead .mind {
font-weight: 600;
overflow-wrap: anywhere;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
.prose {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.reveal-field {
position: relative;
display: flex;
}
main .reveal-field > input {
flex: 1;
min-width: 0;
padding-right: 2.75rem;
}
.reveal-field > button.reveal {
position: absolute;
top: 0;
right: 0;
bottom: 0;
display: grid;
place-items: center;
width: 2.5rem;
min-height: 0;
padding: 0;
background: none;
color: var(--muted-foreground);
}
.reveal-field > button.reveal:hover {
color: var(--foreground);
}
.reveal svg {
width: 1.125rem;
height: 1.125rem;
}
.reveal[aria-pressed="true"] .shows,
.reveal[aria-pressed="false"] .hides {
display: none;
}
button[aria-disabled="true"] {
cursor: progress;
opacity: 0.6;
}
a.button {
display: flex;
align-items: center;
justify-content: center;
min-height: 2.25rem;
padding: 0 1rem;
border-radius: calc(var(--radius) - 2px);
background: var(--primary);
color: var(--primary-foreground);
font-size: 0.875rem;
text-decoration: none;
}
main.wide a.button {
display: inline-flex;
}
a.button:hover {
background: color-mix(in oklab, var(--primary) 90%, transparent);
}`;

/** The CSP source that allows that `<style>` and no other: its SHA-256. */
// allow-high-entropy-next-line: a hash of the public stylesheet above, not a secret
export const plainPageCssHash = "'sha256-eOpsA+PohMVZskqVroM9x40UXrfcbtKUoNY8w+xjSqg='";