~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0
215 lines · 5.7 KB Raw History
/* Starlight in Monolith's look (monolith.css), as the landing page has it:
   near-black, Space Grotesk, code in JetBrains Mono. Dark only: the light
   theme Starlight picks on a light system is given the same palette. */

@import './monolith.css';

:root,
:root[data-theme='light'] {
  --sl-color-white: var(--m-fg);
  --sl-color-gray-1: var(--m-fg);
  --sl-color-gray-2: var(--m-mute);
  --sl-color-gray-3: var(--m-faint);
  --sl-color-gray-4: #5c5c58;
  --sl-color-gray-5: var(--m-line);
  --sl-color-gray-6: var(--m-line-soft);
  --sl-color-gray-7: var(--m-panel);
  --sl-color-black: var(--m-bg);
  --sl-color-accent-low: var(--m-line-soft);
  --sl-color-accent: var(--m-fg);
  --sl-color-accent-high: var(--m-bright);
  --sl-color-text: var(--m-mute);
  --sl-color-text-accent: var(--m-bright);
  --sl-color-text-invert: var(--m-bg);
  --sl-color-bg: var(--m-bg);
  --sl-color-bg-nav: var(--m-bg);
  --sl-color-bg-sidebar: var(--m-bg);
  --sl-color-bg-inline-code: var(--m-line-soft);
  --sl-color-hairline: var(--m-line);
  --sl-color-hairline-light: var(--m-line);
  --sl-color-hairline-shade: var(--m-line);
  --sl-font: var(--m-sans);
  --sl-text-h1: 2.5rem;
  --sl-text-h2: 1.75rem;
  --sl-text-h3: 1.25rem;
  --sl-text-h4: 1.0625rem;
  --sl-font-mono: var(--m-mono);
  --sl-line-height: 1.6;
  color-scheme: dark;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--m-fg);
}

/* The header: the wordmark as the landing page's nav sets it. */
.site-title {
  font-family: var(--m-mono);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--m-mute);
}

/* A section's heading is ruled off. */
.sl-markdown-content .level-h2 {
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--m-line);
}

/* Links underlined quietly, brightening on hover. */
.sl-markdown-content a:not(:where(.not-content *)) {
  color: var(--m-fg);
  text-decoration-color: var(--m-faint);
  text-underline-offset: 0.2em;
}
.sl-markdown-content a:not(:where(.not-content *)):hover {
  color: var(--m-bright);
  text-decoration-color: currentColor;
}

/* A page named as code, as the spec names them, still reads as a link. */
.sl-markdown-content a:not(:where(.not-content *)) code {
  text-decoration: underline;
  text-decoration-color: var(--m-faint);
  text-underline-offset: 0.2em;
}
.sl-markdown-content a:not(:where(.not-content *)):hover code {
  text-decoration-color: currentColor;
}

/* Inline code on a ground a step up from the page's, with a hairline, so
   it reads as code against the near-black. */
.sl-markdown-content code {
  font-size: 0.85em;
  color: var(--m-fg);
}
.sl-markdown-content :not(pre, h1, h2, h3, h4, h5, h6) > code:not(.method-facts code) {
  border: 1px solid var(--m-line);
  border-radius: 3px;
  padding: 0.1em 0.35em;
}

/* Sidebar: the page one is on marked. */
.sidebar-content a[aria-current='page'] {
  background: var(--m-line-soft);
  color: var(--m-bright);
  font-weight: 500;
}

/* Tables as the landing page's: hairlines between rows, figures in mono.
   The spec's are wide: they scroll rather than squeeze. */
.sl-markdown-content table {
  display: block;
  overflow-x: auto;
  font-size: 0.875rem;
  border-collapse: collapse;
}
.sl-markdown-content :is(th, td) {
  border: 0;
  border-top: 1px solid var(--m-line-soft);
  background: none;
}
.sl-markdown-content th {
  font-family: var(--m-mono);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--m-faint);
  border-top: 0;
}

/* A method's HTTP verb, as a badge before its path (the methods page). */
.method {
  display: inline-block;
  padding: 0 0.4rem;
  font: 600 0.75rem / 1.6 var(--m-mono);
  letter-spacing: 0.06em;
  vertical-align: 0.1em;
  border: 1px solid var(--m-line);
  color: var(--m-fg);
}
.method-post {
  background: var(--m-line-soft);
}
.method-ws {
  color: var(--m-faint);
}

/* A heading that is a name in code, as the methods page's: the name in
   mono, without the box inline code has in prose. */
.sl-markdown-content :is(h2, h3) code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: var(--m-fg);
}
/* Each method is ruled off from the one before it; the first under a
   namespace's heading is not, as that heading is ruled off already. */
.sl-markdown-content .level-h3:has(code) {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--m-line-soft);
}
.sl-markdown-content .level-h2 + .level-h3:has(code) {
  margin-top: 1.5rem;
  padding-top: 0;
  border-top: none;
}

/* A method's names and facts, each on a line of its own: what it is
   called over XRPC, in the CLI and as an MCP tool, what it takes and
   answers, and where it is specified. */
.sl-markdown-content .method-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.5rem;
  margin-top: 1rem;
  font-size: 0.875rem;
}
.sl-markdown-content .method-facts dt {
  margin: 0;
  padding-top: 0.15rem;
  font: 400 0.75rem / 1.6 var(--m-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--m-faint);
}
.sl-markdown-content .method-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.sl-markdown-content .method-facts code {
  background: none;
  padding: 0;
}
.sl-markdown-content .method-none {
  color: var(--m-faint);
}
.sl-markdown-content .method-label {
  margin-top: 1.5rem;
  font: 400 0.75rem / 1.6 var(--m-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--m-faint);
}

/* The header's link to the repository, quiet, with no divider after it:
   Starlight's sits before the theme picker, which the site leaves out. */
.social-icons::after {
  display: none;
}
.social-icons a {
  color: var(--m-faint);
}
.social-icons a:hover {
  color: var(--m-fg);
}