mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
532 lines
12 KiB
CSS
532 lines
12 KiB
CSS
:root {
|
|
--sl-color-bg: hsl(0, 20%, 99%);
|
|
--sl-color-gray-5: hsl(0, 1%, 85%);
|
|
--sl-nav-gap: 40px;
|
|
--sl-color-text: hsl(0, 1%, 39%);
|
|
--sl-border-color: hsl(0, 1%, 85%);
|
|
--sl-color-hairline-shade: hsl(0, 1%, 85%);
|
|
|
|
--color-background: hsl(0, 20%, 99%);
|
|
--color-background-weak: hsl(0, 8%, 97%);
|
|
--color-background-weak-hover: hsl(0, 8%, 94%);
|
|
--color-background-strong: hsl(0, 5%, 12%);
|
|
--color-background-strong-hover: hsl(0, 5%, 18%);
|
|
--color-background-interactive: hsl(62, 84%, 88%);
|
|
--color-background-interactive-weaker: hsl(64, 74%, 95%);
|
|
|
|
--color-text: hsl(0, 1%, 39%);
|
|
--color-text-weak: hsl(0, 1%, 60%);
|
|
--color-text-weaker: hsl(0, 3%, 88%);
|
|
--color-text-strong: hsl(0, 5%, 12%);
|
|
--color-text-inverted: hsl(0, 20%, 99%);
|
|
|
|
--color-border: hsl(30, 2%, 81%);
|
|
--color-border-weak: hsl(0, 1%, 85%);
|
|
|
|
--color-icon: hsl(0, 1%, 55%);
|
|
|
|
/* For the share component */
|
|
--sl-color-bg-surface: var(--sl-color-bg-nav);
|
|
--sl-color-divider: var(--sl-color-gray-5);
|
|
|
|
/* Fixed v2 announcement bar rendered below the header by PageFrame */
|
|
--v2-banner-height: 2.75rem;
|
|
}
|
|
|
|
:root[data-has-hero] {
|
|
--v2-banner-height: 0rem;
|
|
}
|
|
|
|
/* Shift fixed chrome below the v2 banner */
|
|
mobile-starlight-toc nav {
|
|
top: calc(var(--sl-nav-height) + var(--v2-banner-height) - 1px);
|
|
}
|
|
|
|
html {
|
|
scroll-padding-top: calc(1.5rem + var(--sl-nav-height) + var(--sl-mobile-toc-height) + var(--v2-banner-height));
|
|
}
|
|
|
|
@media (min-width: 72rem) {
|
|
.right-sidebar {
|
|
padding-top: calc(var(--sl-nav-height) + var(--v2-banner-height));
|
|
}
|
|
|
|
html {
|
|
scroll-padding-top: calc(1.5rem + var(--sl-nav-height) + var(--v2-banner-height));
|
|
}
|
|
}
|
|
|
|
body {
|
|
color: var(--color-text) !important;
|
|
font-size: 14px !important;
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
--sl-color-bg: hsl(0, 9%, 7%);
|
|
--sl-color-gray-5: hsl(0, 4%, 23%);
|
|
--sl-color-text: hsl(0, 4%, 71%);
|
|
--sl-border-color: hsl(0, 4%, 23%);
|
|
--sl-color-hairline-shade: hsl(0, 4%, 23%);
|
|
|
|
--color-background: hsl(0, 9%, 7%);
|
|
--color-background-weak: hsl(0, 6%, 10%);
|
|
--color-background-strong: hsl(0, 15%, 94%);
|
|
--color-background-strong-hover: hsl(0, 15%, 97%);
|
|
--color-background-interactive: hsl(62, 100%, 90%);
|
|
--color-background-interactive-weaker: hsl(60, 20%, 8%);
|
|
|
|
--color-text: hsl(0, 4%, 71%);
|
|
--color-text-weak: hsl(0, 2%, 49%);
|
|
--color-text-weaker: hsl(0, 3%, 28%);
|
|
--color-text-strong: hsl(0, 15%, 94%);
|
|
--color-text-inverted: hsl(0, 9%, 7%);
|
|
|
|
--color-border: hsl(0, 3%, 28%);
|
|
--color-border-weak: hsl(0, 4%, 23%);
|
|
|
|
--color-icon: hsl(10, 3%, 43%);
|
|
}
|
|
}
|
|
|
|
body > .page > header.header {
|
|
border-bottom: 1px solid var(--color-border-weak) !important;
|
|
}
|
|
|
|
.sl-markdown-content hr {
|
|
border-bottom: 1px solid var(--color-border-weak) !important;
|
|
}
|
|
|
|
#starlight__on-this-page--mobile {
|
|
border-bottom: 1px solid var(--color-border-weak) !important;
|
|
}
|
|
|
|
mobile-starlight-toc nav summary .toggle {
|
|
opacity: 60% !important;
|
|
text-decoration: none !important;
|
|
}
|
|
|
|
nav.sidebar summary svg.caret {
|
|
color: var(--color-icon) !important;
|
|
}
|
|
|
|
/* Search button style overrides */
|
|
body > .page > header button[data-open-modal] > kbd {
|
|
position: relative;
|
|
display: flex;
|
|
gap: 4px;
|
|
}
|
|
body > .page > header button[data-open-modal] > kbd > kbd {
|
|
color: var(--color-icon) !important;
|
|
font-size: 15px;
|
|
}
|
|
/* Make the Cmd (⌘) keystroke bigger */
|
|
body > .page > header button[data-open-modal][aria-keyshortcuts="Meta+K"] > kbd > kbd:first-child {
|
|
font-size: 20px;
|
|
line-height: 0.73;
|
|
}
|
|
|
|
.starlight-aside__title {
|
|
flex: 0 0 auto;
|
|
margin-top: 3px;
|
|
}
|
|
|
|
body > .page > .main-frame .main-pane > main > .content-panel + .content-panel {
|
|
border-top: none !important;
|
|
}
|
|
|
|
body > .page > header a.site-title img {
|
|
height: 2rem !important;
|
|
}
|
|
|
|
a {
|
|
color: var(--color-text-strong) !important;
|
|
}
|
|
|
|
.page-description {
|
|
color: var(--color-text) !important;
|
|
}
|
|
|
|
.right-sidebar {
|
|
border-inline-start: none !important;
|
|
}
|
|
|
|
.sidebar-pane {
|
|
border-inline-end: 1px solid var(--color-border-weak) !important;
|
|
}
|
|
|
|
.right-sidebar-panel {
|
|
padding: 24px 0 !important;
|
|
color: var(--color-text-weaker);
|
|
}
|
|
|
|
.sidebar-content {
|
|
padding: 24px 0 !important;
|
|
}
|
|
|
|
a[aria-current="page"] {
|
|
border-left: 2px solid var(--color-background-strong);
|
|
background: var(--color-background-weak) !important;
|
|
font-weight: 600 !important;
|
|
}
|
|
|
|
ul.top-level a[aria-current="page"] > span {
|
|
color: var(--color-text-strong) !important;
|
|
}
|
|
|
|
#starlight__sidebar > div > sl-sidebar-state-persist > ul > li > details > summary {
|
|
padding: 0 24px !important;
|
|
margin-top: 20px !important;
|
|
}
|
|
|
|
#starlight__sidebar > div > sl-sidebar-state-persist > ul > li > details > summary:hover {
|
|
background: var(--color-background-weak);
|
|
}
|
|
|
|
#starlight__sidebar > div > sl-sidebar-state-persist > ul > li > details > summary span {
|
|
color: var(--color-text-strong) !important;
|
|
font-weight: 600 !important;
|
|
}
|
|
|
|
.top-level li a {
|
|
border-radius: 0;
|
|
width: 100%;
|
|
padding: 4px 24px !important;
|
|
}
|
|
|
|
.top-level li a:hover {
|
|
background: var(--color-background-weak) !important;
|
|
}
|
|
|
|
.right-group {
|
|
gap: 40px !important;
|
|
}
|
|
|
|
.social-icons {
|
|
gap: 24px !important;
|
|
}
|
|
|
|
.social-icons a svg {
|
|
height: 18px !important;
|
|
width: 18px !important;
|
|
}
|
|
|
|
site-search > button {
|
|
text-transform: none !important;
|
|
}
|
|
|
|
body > .page > header button[data-open-modal] {
|
|
gap: 12px !important;
|
|
background: var(--color-background-weak);
|
|
border: 1px solid var(--color-border-weak) !important;
|
|
padding: 6px 12px !important;
|
|
border-radius: 4px;
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
background: var(--color-background-weak);
|
|
}
|
|
}
|
|
|
|
body > .page > header button[data-open-modal] {
|
|
background: var(--color-background-weaker);
|
|
}
|
|
|
|
site-search > button span {
|
|
text-decoration: none !important;
|
|
}
|
|
|
|
.starlight-aside {
|
|
display: flex;
|
|
gap: 16px;
|
|
align-items: start;
|
|
|
|
.starlight-aside__content {
|
|
margin-top: 0;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
}
|
|
|
|
site-search > button > kbd {
|
|
font-size: 14px !important;
|
|
}
|
|
|
|
h1 a,
|
|
h2 a,
|
|
h3 a,
|
|
h4 a,
|
|
h5 a,
|
|
h6 a {
|
|
color: var(--color-text-strong) !important;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 26px !important;
|
|
text-transform: none !important;
|
|
font-weight: 500 !important;
|
|
color: var(--color-text-strong) !important;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 22px !important;
|
|
text-transform: none !important;
|
|
font-weight: 500 !important;
|
|
color: var(--color-text-strong) !important;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 18px !important;
|
|
text-transform: none !important;
|
|
font-weight: 500 !important;
|
|
color: var(--color-text-strong) !important;
|
|
}
|
|
|
|
h4 {
|
|
font-size: 16px !important;
|
|
text-transform: none !important;
|
|
font-weight: 500 !important;
|
|
color: var(--color-text-strong) !important;
|
|
}
|
|
|
|
strong {
|
|
font-weight: 500 !important;
|
|
}
|
|
|
|
ul,
|
|
ol {
|
|
list-style: none !important;
|
|
padding: 0 !important;
|
|
}
|
|
|
|
.sl-markdown-content ol {
|
|
list-style: decimal !important;
|
|
padding-inline-start: 1.5rem !important;
|
|
}
|
|
|
|
.sl-markdown-content ul:not([role="tablist"]) {
|
|
list-style: disc !important;
|
|
padding-inline-start: 1.5rem !important;
|
|
}
|
|
|
|
/* Starlight 0.41 lays tabs out with flexbox and draws the underline as a box shadow. Keep the earlier border layout so tab heights, underline colors and focus rings stay the same. */
|
|
.sl-markdown-content .tab {
|
|
display: list-item;
|
|
margin-bottom: -2px;
|
|
}
|
|
|
|
.sl-markdown-content .tab > [role="tab"] {
|
|
padding-top: 0;
|
|
line-height: var(--sl-line-height);
|
|
box-shadow: none;
|
|
border-bottom-width: 2px;
|
|
border-bottom-style: solid;
|
|
}
|
|
|
|
.sl-markdown-content .tab > [role="tab"][aria-selected="true"] {
|
|
border-color: var(--color-text-strong);
|
|
}
|
|
|
|
/* Starlight 0.41 also spaces a nested list that ends a list item; earlier versions didn't. */
|
|
.sl-markdown-content li > :is(ul, ol):last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.social-icons a svg {
|
|
color: var(--color-text-weak) !important;
|
|
}
|
|
|
|
.social-icons a svg:hover {
|
|
color: var(--color-text-strong) !important;
|
|
}
|
|
|
|
body > .page > header,
|
|
:root[data-has-sidebar] body > .page > header {
|
|
background: var(--color-background) !important;
|
|
padding: 24px !important;
|
|
}
|
|
|
|
.sl-container {
|
|
box-sizing: border-box !important;
|
|
width: 100% !important;
|
|
}
|
|
|
|
.right-sidebar-panel nav,
|
|
.right-sidebar-panel h2,
|
|
.right-sidebar-panel ul,
|
|
.right-sidebar-panel li,
|
|
.right-sidebar-panel a {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
|
|
.sl-container {
|
|
max-width: 100% !important;
|
|
}
|
|
|
|
nav.sidebar .sl-container ul li a,
|
|
div.right-sidebar .sl-container ul li a {
|
|
padding: 4px 24px !important;
|
|
width: 100% !important;
|
|
color: var(--color-text-weaker);
|
|
opacity: 50%;
|
|
}
|
|
|
|
nav.sidebar .sl-container ul li a:hover,
|
|
div.right-sidebar .sl-container ul li a:hover {
|
|
background: var(--color-background-weak);
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
background: var(--color-background-weak);
|
|
}
|
|
}
|
|
|
|
nav.sidebar .sl-container ul li ul li,
|
|
div.right-sidebar .sl-container ul li ul li {
|
|
padding: 4px 12px 0 12px !important;
|
|
}
|
|
|
|
nav.sidebar .sl-container ul li a[aria-current="true"],
|
|
div.right-sidebar .sl-container ul li a[aria-current="true"] {
|
|
color: var(--color-text-strong) !important;
|
|
opacity: 100%;
|
|
}
|
|
|
|
h2#starlight__on-this-page {
|
|
font-size: 14px !important;
|
|
color: var(--color-text-strong) !important;
|
|
margin: 0 !important;
|
|
font-weight: 400 !important;
|
|
padding: 0 24px 12px 24px;
|
|
}
|
|
|
|
#starlight__on-this-page ul {
|
|
color: var(--color-text-strong) !important;
|
|
font-size: 16px !important;
|
|
}
|
|
|
|
.middle-group .links {
|
|
color: var(--color-icon);
|
|
text-decoration: none;
|
|
text-transform: none;
|
|
font-size: 16px;
|
|
display: none !important;
|
|
}
|
|
|
|
.middle-group .links:hover {
|
|
text-decoration: underline;
|
|
text-underline-offset: 4px;
|
|
text-decoration-thickness: 1px;
|
|
}
|
|
|
|
nav.sidebar ul.top-level > li > details > summary .group-label > span {
|
|
margin-top: 24px !important;
|
|
color: var(--color-text-strong) !important;
|
|
text-transform: none !important;
|
|
font-weight: 500 !important;
|
|
}
|
|
|
|
.content-panel {
|
|
padding: 2rem 3rem !important;
|
|
|
|
@media (max-width: 768px) {
|
|
padding: 1rem 1.5rem !important;
|
|
}
|
|
}
|
|
|
|
.expressive-code {
|
|
margin: 0.75rem 0 3rem 0 !important;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.expressive-code figure {
|
|
background: var(--color-background-weak) !important;
|
|
}
|
|
|
|
.expressive-code .frame {
|
|
box-shadow: none;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
.shiki,
|
|
.shiki span {
|
|
color: var(--shiki-dark) !important;
|
|
background-color: var(--shiki-dark-bg) !important;
|
|
/* Optional, if you also want font styles */
|
|
font-style: var(--shiki-dark-font-style) !important;
|
|
font-weight: var(--shiki-dark-font-weight) !important;
|
|
text-decoration: var(--shiki-dark-text-decoration) !important;
|
|
}
|
|
}
|
|
|
|
/* Starlight 0.41 relaxed this to `break-word`, so long inline code no longer shrinks: tables reflow and asides overflow on phones. Keep the earlier wrapping. */
|
|
p,
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6,
|
|
:not(pre) > code {
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
/* Starlight 0.41 adds automatic spacing between CJK and Latin characters. */
|
|
[lang] {
|
|
text-autospace: no-autospace;
|
|
}
|
|
|
|
/* Starlight 0.41 dims the language and theme picker labels. */
|
|
:is(starlight-lang-select, starlight-theme-select) label {
|
|
color: var(--sl-color-gray-1);
|
|
}
|
|
|
|
:is(starlight-lang-select, starlight-theme-select) label:hover {
|
|
color: var(--sl-color-gray-2);
|
|
}
|
|
|
|
/* Starlight 0.41 replaced the fade on mobile menu social links with a color change. */
|
|
.mobile-preferences .social-icons a:hover {
|
|
opacity: 0.66;
|
|
}
|
|
|
|
/* The theme styles the search dialog through `aria-label="Search"`, which only matches English pages. Apply the same styles in every language.
|
|
The CSS minifier keeps only the last of a duplicated prefixed/unprefixed pair, so the unprefixed one goes last. */
|
|
site-search dialog {
|
|
border: 1px solid var(--sl-color-border);
|
|
border-radius: 0;
|
|
background-color: var(--sl-color-bg);
|
|
box-shadow: var(--sl-shadow-md);
|
|
}
|
|
|
|
site-search dialog[open] {
|
|
animation: fadeInScaleUp 0.2s ease forwards;
|
|
}
|
|
|
|
site-search dialog::backdrop {
|
|
-webkit-backdrop-filter: blur(2px);
|
|
backdrop-filter: blur(2px);
|
|
animation: fadeInBackdrop 0.2s ease forwards;
|
|
}
|
|
|
|
mobile-starlight-toc nav {
|
|
-webkit-backdrop-filter: blur(8px);
|
|
backdrop-filter: blur(8px);
|
|
}
|
|
|
|
/* Starlight 0.41 keeps the "On this page" column at least a sidebar wide, which narrows the content between 1160px and 1320px. Keep the earlier proportional widths. */
|
|
@media (min-width: 72rem) {
|
|
.right-sidebar-container {
|
|
width: calc(var(--sl-sidebar-width) + (100% - var(--sl-content-width) - var(--sl-sidebar-width)) / 2);
|
|
}
|
|
|
|
[data-has-sidebar][data-has-toc] .main-pane {
|
|
width: calc(var(--sl-content-width) + (100% - var(--sl-content-width) - var(--sl-sidebar-width)) / 2);
|
|
}
|
|
}
|
|
|
|
/* Starlight 0.41 turns off iOS text inflation in landscape; keep the browser default. */
|
|
html {
|
|
-webkit-text-size-adjust: auto;
|
|
text-size-adjust: auto;
|
|
}
|