TsukiNi22/ai-utils / skills/docs/html-style
html-style
VerifiedThe user's visual style for any HTML page (taken from html-doc - R-Type doc colors + context-forge layout) - color tokens for the light and dark themes, system font stacks and type scale, spacing / radius / layout / breakpoints, components (top bar, cards, callouts, tables, code blocks with copy, content tabs, sidebar, pager, SVG diagram classes, sun/moon theme switch, EN/FR switch), rules (responsive on phone, tablet, TV and touch screens, self-contained, no CDN / web font / gradient / emoji, WCAG contrast in both themes) - with scripts to build a self-contained page (new_page.py) and check a page or a palette (check_style.py). Use whenever creating or restyling an HTML page, a small web tool, a dashboard or a page component for the user, or when defining / changing a palette, color, font or theme, unless the user asks for another style.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 16.2 KB |
| scripts/check_render.pyexecutable | script | 27.1 KB |
| scripts/check_style.pyexecutable | script | 25.1 KB |
| scripts/new_page.pyexecutable | script | 4.0 KB |
| scripts/set_logo.pyexecutable | script | 6.1 KB |
| scripts/sync_nav.pyexecutable | script | 7.3 KB |
| templates/base.js | script | 20.1 KB |
| templates/page.html | other | 2.6 KB |
| templates/style.css | other | 25.2 KB |
templates/style.css
View on GitHub/* Visual system of the user's HTML pages (source: html-doc/templates/technical.html, R-Type doc colors +
context-forge layout). Inlined in each page by scripts/new_page.py: pages stay self-contained. */
:root {
color-scheme: light; /* the fields, the scrollbars and the rest drawn by the browser follow the theme */
accent-color: var(--accent);
--bg: #efede8;
--surface: #f7f5f0;
--text: #1d1f23;
--muted: #5d636e;
--border: #dad6cd;
--accent: #2f5bd3;
--accent-soft: #e6ecfb;
--warn: #a8540a;
--warn-soft: #fbefe3;
--ok: #1f7a4a;
--ok-soft: #e3f4ea;
--code-bg: #e9e6df;
--node: #f7f5f0;
--node-alt: #eef1f8;
--line: #868c97;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
color-scheme: dark;
--bg: #15171b;
--surface: #1d2025;
--text: #e6e7ea;
--muted: #9aa0ab;
--border: #30343b;
--accent: #7d9cf0;
--accent-soft: #232c45;
--warn: #f0a868;
--warn-soft: #3a2a1b;
--ok: #6fcf97;
--ok-soft: #1b3326;
--code-bg: #24272d;
--node: #23262c;
--node-alt: #283043;
--line: #747a85;
}
}
:root[data-theme="dark"] {
color-scheme: dark;
--bg: #15171b;
--surface: #1d2025;
--text: #e6e7ea;
--muted: #9aa0ab;
--border: #30343b;
--accent: #7d9cf0;
--accent-soft: #232c45;
--warn: #f0a868;
--warn-soft: #3a2a1b;
--ok: #6fcf97;
--ok-soft: #1b3326;
--code-bg: #24272d;
--node: #23262c;
--node-alt: #283043;
--line: #747a85;
}
/* scrollbars: thin, a transparent track, a rounded thumb in the theme (never the wide grey bar of the browser on hover) */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--line) 55%, transparent) transparent; }
*:hover { scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--line) 55%, transparent); background-clip: padding-box; border: 3px solid transparent; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--line); background-clip: padding-box; border-width: 2px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.layout {
display: grid;
grid-template-columns: 250px minmax(0, 1fr);
gap: 40px;
max-width: 1180px;
margin: 0 auto;
padding: 40px 24px 80px;
}
main { min-width: 0; }
header h1 { font-size: 34px; line-height: 1.2; margin: 0 0 8px; }
header p { color: var(--muted); margin: 0 0 32px; max-width: 70ch; }
section {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 28px 32px;
margin-bottom: 24px;
scroll-margin-top: 72px;
}
h2 { font-size: 22px; margin: 0 0 16px; }
h3 { font-size: 17px; margin: 28px 0 10px; }
/* What a page may hold without a class of its own: never a default of the browser. :where(): any rule of a component wins */
:where(h4) { font-size: 15.5px; margin: 22px 0 8px; }
:where(h5) { font-size: 14.5px; margin: 18px 0 6px; }
:where(h6) { font-size: 13px; margin: 16px 0 6px; color: var(--muted); }
:where(hr) { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
:where(blockquote) { margin: 16px 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--border); color: var(--muted); }
:where(kbd) { font: 0.82em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
:where(mark) { background: color-mix(in srgb, var(--warn) 28%, transparent); color: var(--text); border-radius: 3px; padding: 0 3px; }
:where(samp) { font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
:where(abbr[title]) { text-decoration: underline dotted var(--muted); cursor: help; }
:where(small) { font-size: 13px; }
:where(sub, sup) { line-height: 0; }
:where(details) { margin: 12px 0; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; }
:where(summary) { cursor: pointer; font-weight: 600; }
:where(details[open] > summary) { margin-bottom: 8px; }
:where(dl) { margin: 12px 0; }
:where(dt) { font-weight: 600; }
:where(dd) { margin: 0 0 8px 16px; }
:where(caption) { caption-side: top; text-align: left; color: var(--muted); font-size: 13px; padding-bottom: 6px; }
:where(fieldset) { margin: 12px 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
:where(legend) { padding: 0 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
:where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file]), select, textarea) { font: inherit; font-size: 14.5px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; max-width: 100%; }
:where(input, select, textarea)::placeholder { color: var(--muted); opacity: 1; }
:where(input, select, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
:where(button:not([class])) { font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
:where(button:not([class])):hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
:where(button:not([class])):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:where(button:disabled) { opacity: .55; cursor: not-allowed; }
:where(progress, meter) { max-width: 100%; }
p, li { max-width: 75ch; }
a { color: var(--accent); }
code {
font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
background: var(--code-bg);
padding: 1px 5px;
border-radius: 4px;
}
pre {
background: var(--code-bg);
border: 1px solid var(--border);
border-radius: 8px;
padding: 14px 16px;
overflow-x: auto;
font: 13.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
pre code { background: none; padding: 0; }
.table-wrap { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
td pre { margin: 0; }
td > :first-child { margin-top: 0; }
td > :last-child { margin-bottom: 0; }
th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.callout {
background: var(--accent-soft);
border-left: 3px solid var(--accent);
padding: 12px 16px;
border-radius: 0 6px 6px 0;
margin: 16px 0;
}
.callout.warn { background: var(--warn-soft); border-left-color: var(--warn); }
.callout.ok { background: var(--ok-soft); border-left-color: var(--ok); }
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
figure { margin: 20px 0; }
figure svg { width: 100%; height: auto; display: block; }
figcaption { color: var(--muted); font-size: 13px; margin-top: 6px; }
:where(main, figure, .stepper, .diagram) svg text { fill: var(--text); } /* any text of a drawing: the theme's colour, no weight (every class below wins) */
svg .box { fill: var(--node); stroke: var(--line); stroke-width: 1.2; }
svg .box-alt { fill: var(--node-alt); stroke: var(--accent); stroke-width: 1.2; }
svg .group { fill: none; stroke: var(--border); stroke-width: 1.5; stroke-dasharray: 5 4; }
svg .lbl { fill: var(--text); font: 13px system-ui, sans-serif; }
svg .small { fill: var(--muted); font: 11.5px system-ui, sans-serif; }
svg .title { fill: var(--muted); font: 600 12px system-ui, sans-serif; letter-spacing: .05em; }
svg .mono { fill: var(--text); font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; } /* values, code, file content */
svg .mono-s { fill: var(--text); font: 11.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
svg .edge { stroke: var(--line); stroke-width: 1.4; fill: none; }
svg .edge-accent { stroke: var(--accent); stroke-width: 1.6; fill: none; }
svg .dash { stroke-dasharray: 4 4; }
svg .arrow { fill: var(--line); }
svg .arrow-accent { fill: var(--accent); }
.topbar {
position: sticky; top: 0; z-index: 20;
display: flex; align-items: center; gap: 18px;
height: 56px; padding: 0 20px;
background: var(--surface);
border-bottom: 1px solid var(--border);
}
.tabs { display: flex; gap: 4px; margin-left: 8px; overflow-x: auto; }
.tabs[hidden] { display: none; }
.tabs a {
padding: 6px 12px; border-radius: 6px;
color: var(--muted); text-decoration: none; font-size: 14px; white-space: nowrap;
}
.tabs a:hover { color: var(--text); background: var(--code-bg); }
.tabs a.current { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .tabs { scrollbar-width: none; } /* a long name squeezes the tabs: they scroll, no bar in the bar */
.topbar .tabs::-webkit-scrollbar { display: none; }
.topbar .top-actions { margin-left: auto; } /* on the right even when no tab or spacer pushes them (small screens) */
.icon-btn {
display: grid; place-items: center;
width: 36px; height: 36px; padding: 0;
background: var(--surface); color: var(--text);
border: 1px solid var(--border); border-radius: 50%;
cursor: pointer; text-decoration: none;
transition: border-color .15s, color .15s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn svg { width: 18px; height: 18px; }
@media (max-width: 860px) {
.layout { grid-template-columns: 1fr; padding: 24px 16px 60px; gap: 16px; }
.topbar { gap: 10px; padding: 0 12px; }
.brand .ver { display: none; }
.menu-btn { display: grid; }
.sidebar { position: fixed; top: 56px; left: 0; bottom: 0; z-index: 25; width: min(300px, 85vw); max-height: none; padding: 16px 10px; background: var(--bg); border-right: 1px solid var(--border); transform: translateX(-105%); transition: transform .2s; }
.sidebar.open { transform: none; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
section { padding: 20px 16px; }
header h1 { font-size: 27px; }
}
/* Language switch (EN / FR pill) */
.lang-switch {
display: inline-flex; align-items: center; gap: 2px; padding: 3px;
border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface);
}
.lang-switch button {
border: 0; background: none; color: var(--text); cursor: pointer;
font: 600 12.5px system-ui, sans-serif; letter-spacing: .03em;
padding: 4px 11px; border-radius: 999px; transition: background .2s, color .2s;
}
.lang-switch button.on { background: var(--accent); color: var(--surface); }
.lang-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Theme switch: blue track + sun (light), black track + moon and stars (dark) */
.theme-switch {
position: relative; width: 58px; height: 30px; flex: none; padding: 0; border: 0; border-radius: 999px;
background: #2196f3; cursor: pointer; transition: background .3s;
}
.theme-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-switch .knob {
position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
display: grid; place-items: center; transition: transform .3s, background .3s;
}
.theme-switch .knob svg { width: 22px; height: 22px; }
.theme-switch .sun { display: block; }
.theme-switch .moon, .theme-switch .stars { display: none; }
.theme-switch .stars { position: absolute; inset: 0; }
.theme-switch .stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; }
.theme-switch .stars i:nth-child(1) { left: 9px; top: 9px; }
.theme-switch .stars i:nth-child(2) { left: 16px; top: 18px; width: 1.5px; height: 1.5px; }
.theme-switch .stars i:nth-child(3) { left: 21px; top: 8px; width: 1.5px; height: 1.5px; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .theme-switch { background: #0b0b0d; box-shadow: inset 0 0 0 1px #2a2c31; }
:root:not([data-theme="light"]) .theme-switch .knob { transform: translateX(28px); background: #ffffff; }
:root:not([data-theme="light"]) .theme-switch .sun { display: none; }
:root:not([data-theme="light"]) .theme-switch .moon, :root:not([data-theme="light"]) .theme-switch .stars { display: block; }
}
:root[data-theme="dark"] .theme-switch { background: #0b0b0d; box-shadow: inset 0 0 0 1px #2a2c31; }
:root[data-theme="dark"] .theme-switch .knob { transform: translateX(28px); background: #ffffff; }
:root[data-theme="dark"] .theme-switch .sun { display: none; }
:root[data-theme="dark"] .theme-switch .moon, :root[data-theme="dark"] .theme-switch .stars { display: block; }
/* Bilingual content: only the active language is shown */
:root[lang="en"] [data-lang="fr"], :root[lang="fr"] [data-lang="en"] { display: none !important; }
/* ---------- Header: logo + version badge, mobile menu ---------- */
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; white-space: nowrap; }
.brand .logo { width: 26px; height: 26px; flex: none; color: var(--accent); object-fit: contain; }
.brand { min-width: 0; }
.brand .repo-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.brand .ver { font-size: 12px; color: var(--muted); font-weight: 500; padding: 2px 6px; border: 1px solid var(--border); border-radius: 6px; }
.brand .ver:empty { display: none; } /* no version: the name alone */
.menu-btn { display: none; }
/* ---------- Sidebar tree (pages > sections of the current page) ---------- */
.sidebar { position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; font-size: 14px; }
@media (max-width: 860px) { .sidebar { position: fixed; top: 56px; max-height: none; } } /* off-canvas menu: out of the flow */
.sidebar p { margin: 0 0 8px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.sidebar a { display: block; padding: 5px 10px; color: var(--muted); text-decoration: none; border-left: 2px solid var(--border); }
.sidebar a:hover, .sidebar a.active { color: var(--accent); border-left-color: var(--accent); }
/* ---------- Page header: eyebrow + title + lead ---------- */
.page-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 6px; }
header .lead { font-size: 17px; color: var(--muted); margin: 0 0 32px; max-width: 70ch; }
/* ---------- Heading anchors ---------- */
h2 .anchor, h3 .anchor { margin-left: 8px; color: var(--muted); font-weight: 400; text-decoration: none; opacity: 0; transition: opacity .15s; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus { opacity: 1; }
/* ---------- Code blocks: title bar + copy button ---------- */
pre { position: relative; }
pre[data-title]::before {
content: attr(data-title); display: block; margin: -14px -16px 12px; padding: 6px 16px;
font: 12px system-ui, sans-serif; color: var(--muted); border-bottom: 1px solid var(--border);
background: var(--surface); border-radius: 7px 7px 0 0;
}
pre .copy {
position: absolute; top: 8px; right: 8px; font: 12px system-ui, sans-serif; cursor: pointer;
border: 1px solid var(--border); background: var(--surface); color: var(--muted);
border-radius: 6px; padding: 3px 8px; opacity: 0; transition: opacity .15s;
}
pre[data-title] .copy { top: 5px; }
pre[data-title]::before { white-space: normal; overflow-wrap: anywhere; padding-right: 72px; } /* a long title wraps: never under the Copy button, never past the block */
.figure-scroll { overflow-x: auto; } /* a drawing on a small screen scrolls in its box (base.js), its labels stay readable */
.figure-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
pre:hover .copy, pre .copy:focus { opacity: 1; }
pre .copy:hover { color: var(--text); }
/* ---------- Content tabs ---------- */
.ctabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: 12px 0; }
.ctabs button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 12px; cursor: pointer; color: var(--muted); font: 500 14px system-ui, sans-serif; }
.ctabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.ctab-panel { display: none; }
.ctab-panel.active { display: block; }
/* ---------- Previous / next page ---------- */
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; }
.pager a { flex: 1; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; }
.pager a:hover { border-color: var(--accent); }
.pager a span { display: block; font-size: 12px; color: var(--muted); }
.pager a.next { text-align: right; }
.pager:empty { display: none; }
/* ---------- Footer ---------- */
/* RGAA 12.7: skip link, first focusable element of the page (visible only when focused); the target is the main region */
.skip-link { position: absolute; left: 8px; top: -64px; z-index: 1000; padding: 10px 14px; border-radius: 8px; background: var(--accent); color: var(--surface); font-weight: 600; text-decoration: none; }
.skip-link:focus, .skip-link:focus-visible { top: 8px; outline: 2px solid var(--text); outline-offset: 2px; }
.skip-link code { color: var(--surface); }
main:focus { outline: none; }
/* RGAA 7.3: a block that scrolls (code, table) is reached and scrolled with the keyboard */
pre:focus-visible, .table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
footer.site { max-width: 1180px; margin: 0 auto; padding: 22px 24px 30px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
footer.site a { color: var(--accent); }
@media (max-width: 860px) {
.menu-btn { display: grid; }
footer.site { padding: 20px 16px; }
.topbar .tabs { display: none; } /* the sidebar (menu) gives the navigation on mobile */
}
.topbar .icon-btn, .topbar .lang-switch, .topbar .theme-switch { flex: none; }
.topbar .tabs { min-width: 0; }
@media (max-width: 860px) {
.topbar .spacer { display: none; }
.topbar .tabs { flex: 1 1 auto; }
.topbar .icon-btn { width: 32px; height: 32px; }
}
@media (max-width: 480px) {
.topbar { gap: 8px; padding: 0 10px; }
.topbar a.icon-btn[href] { display: none; } /* GitHub link: also in the footer / graph panel */
.lang-switch button { padding: 4px 9px; }
}
@media (min-width: 1340px) {
.layout { grid-template-columns: minmax(0, 1fr) minmax(0, 880px) minmax(0, 1fr); max-width: none; }
.layout > .sidebar { grid-column: 1; justify-self: end; width: 230px; }
.layout > main { grid-column: 2; }
footer.site { max-width: 880px; }
}
/* ---------- No scroll beyond the page ---------- */
html, body { overscroll-behavior: none; }
/* ---------- Top right actions: same height, grouped, divider ---------- */
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.top-actions .divider { width: 1px; height: 22px; background: var(--border); margin: 0 2px; }
.top-actions .icon-btn { width: 34px; height: 34px; }
.top-actions .lang-switch { height: 34px; padding: 3px; background: var(--code-bg); border: 1px solid var(--border); }
.top-actions .lang-switch button { height: 26px; padding: 0 10px; font-size: 12px; }
.top-actions .theme-switch { width: 56px; height: 30px; border: 1px solid transparent; }
.top-actions .theme-switch .knob { top: 2px; left: 2px; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .top-actions .theme-switch { border-color: var(--border); box-shadow: none; }
:root:not([data-theme="light"]) .top-actions .theme-switch .knob { transform: translateX(26px); }
}
:root[data-theme="dark"] .top-actions .theme-switch { border-color: var(--border); box-shadow: none; }
:root[data-theme="dark"] .top-actions .theme-switch .knob { transform: translateX(26px); }
@media (max-width: 480px) { .top-actions .divider { display: none; } }
/* ---------- Responsive: phones, tablets, touch screens, notches, TVs, print ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, canvas, svg { max-width: 100%; }
img, video { height: auto; }
main, footer.site, .sidebar { overflow-wrap: break-word; }
code { overflow-wrap: anywhere; }
pre, pre code { overflow-wrap: normal; }
td code, th code { overflow-wrap: inherit; } /* base.js: a cell that keeps its words whole unless one is too long for any column */
.sidebar { max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px); overscroll-behavior: contain; }
/* Notches and rounded corners (viewport-fit=cover): the content stays inside the safe area */
.topbar { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.layout { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
footer.site { padding-bottom: max(30px, env(safe-area-inset-bottom)); }
/* Very large screens (TV, 4K): a bigger base so the page stays readable at a distance */
@media (min-width: 1900px) { body { font-size: 18px; } }
@media (min-width: 2600px) { body { font-size: 21px; } }
/* Tablets and small laptops: tighter column gap */
@media (min-width: 861px) and (max-width: 1100px) { .layout { gap: 24px; grid-template-columns: 210px minmax(0, 1fr); } }
@media (max-width: 860px) {
.topbar { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
.layout { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.sidebar { top: 56px; bottom: 0; height: auto; align-self: stretch; max-height: none; padding-bottom: max(16px, env(safe-area-inset-bottom)); overflow-y: auto; } /* the menu down to the bottom of the screen, not the height of its links */
input, select, textarea { font-size: 16px; } /* under 16px iOS zooms the page on focus */
table { font-size: 13.5px; }
th, td { padding: 6px 8px; }
pre { font-size: 12.5px; padding: 12px; }
pre[data-title]::before { margin: -12px -12px 12px; padding-left: 12px; } /* the padding of the block: else its title bar is wider than it and it scrolls for nothing */
.formula { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media (max-width: 600px) {
.pager { flex-direction: column; }
.pager a.next { text-align: left; }
section { border-radius: 8px; }
h2 { font-size: 20px; }
.ctabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.ctabs button { white-space: nowrap; flex: none; }
}
@media (max-width: 480px) {
.layout { padding-top: 16px; }
header h1 { font-size: 24px; }
header .lead { font-size: 16px; }
.callout { padding: 10px 12px; }
}
/* Phone held sideways: little height, keep the bar slim */
@media (max-height: 480px) and (orientation: landscape) {
.topbar { height: 48px; }
.sidebar { top: 48px; }
section { scroll-margin-top: 56px; }
}
/* Touch (no hover): what only showed on hover is always there, and targets are finger sized */
@media (hover: none) {
pre .copy { opacity: 1; }
pre:not([data-title]):not([data-nocopy]) { padding-top: 40px; } /* the Copy button always there: above the code, not over it */
h2 .anchor, h3 .anchor { opacity: 1; }
dfn[data-def] { cursor: pointer; }
}
@media (pointer: coarse) {
.icon-btn { width: 44px; height: 44px; }
.topbar .icon-btn { width: 40px; height: 40px; } /* over the size of a small screen: a finger first */
pre:not([data-title]):not([data-nocopy]) { padding-top: 50px; }
.top-actions .icon-btn { width: 40px; height: 40px; }
.tabs a, .ctabs button, .sidebar a { min-height: 44px; display: flex; align-items: center; }
.sidebar a { padding-top: 0; padding-bottom: 0; }
.lang-switch button, .top-actions .lang-switch button { min-height: 32px; min-width: 38px; }
pre .copy { padding: 8px 12px; font-size: 13px; }
summary { min-height: 44px; padding-block: 10px; } /* still a list item: its marker kept, a long word wraps */
.pager a, .btn { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
.theme-switch, .lang-switch, .icon-btn { border: 1px solid ButtonText; }
.tabs a.current, .ctabs button.active, .lang-switch button.on { outline: 2px solid Highlight; }
}
@media print {
:root, :root[data-theme="dark"], :root:not([data-theme="light"]) {
color-scheme: light;
--bg: #ffffff; --surface: #ffffff; --text: #1d1f23; --muted: #5d636e; --border: #dad6cd; --accent: #2f5bd3; --accent-soft: #e6ecfb;
--warn: #a8540a; --warn-soft: #fbefe3; --ok: #1f7a4a; --ok-soft: #e3f4ea; --code-bg: #e9e6df; --node: #f7f5f0; --node-alt: #eef1f8; --line: #868c97;
}
.table-wrap, .figure-scroll { overflow: visible; }
td, th { white-space: normal !important; min-width: 0 !important; } /* base.js fits a table to the screen, not to the paper */
.topbar, .sidebar, .pager, .menu-btn, pre .copy, .top-actions, .h-anchor, .anchor { display: none !important; }
.layout { display: block; max-width: none; padding: 0; }
section { break-inside: avoid-page; border: 0; padding: 0 0 12px; background: none; }
pre { white-space: pre-wrap; overflow: visible; }
body { background: var(--bg); color: var(--text); }
a { color: inherit; }
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |