|
| 1 | +/** |
| 2 | + * Shared theme for the MCP TypeScript SDK docs (v2 and v1 sites). |
| 3 | + * |
| 4 | + * Visual pass modeled on the Python SDK docs (py.sdk.modelcontextprotocol.io), |
| 5 | + * which use mkdocs-material with a monochrome palette: primary/accent black on |
| 6 | + * light, white on slate dark. We map that onto VitePress brand variables. |
| 7 | + */ |
| 8 | + |
| 9 | +/* ---------------------------------------------------------------- branding */ |
| 10 | + |
| 11 | +:root { |
| 12 | + /* Monochrome brand: near-black on light backgrounds. */ |
| 13 | + --vp-c-brand-1: #1a1a1a; |
| 14 | + --vp-c-brand-2: #333333; |
| 15 | + --vp-c-brand-3: #1f1f1f; |
| 16 | + --vp-c-brand-soft: rgba(0, 0, 0, 0.08); |
| 17 | + |
| 18 | + /* Restrained accent for links — dark with a faint blue cast, like |
| 19 | + material's black-primary link color. */ |
| 20 | + --vp-c-text-link: #21409a; |
| 21 | + |
| 22 | + /* Neutral grays. */ |
| 23 | + --vp-c-gray-1: #dddde3; |
| 24 | + --vp-c-gray-2: #e4e4e9; |
| 25 | + --vp-c-gray-3: #ebebef; |
| 26 | + |
| 27 | + /* Buttons: solid black, like material's primary buttons. */ |
| 28 | + --vp-button-brand-bg: #1a1a1a; |
| 29 | + --vp-button-brand-border: #1a1a1a; |
| 30 | + --vp-button-brand-text: #ffffff; |
| 31 | + --vp-button-brand-hover-bg: #333333; |
| 32 | + --vp-button-brand-hover-border: #333333; |
| 33 | + --vp-button-brand-hover-text: #ffffff; |
| 34 | + --vp-button-brand-active-bg: #000000; |
| 35 | + --vp-button-brand-active-border: #000000; |
| 36 | + --vp-button-brand-active-text: #ffffff; |
| 37 | + |
| 38 | + /* Home hero: plain text, no gradient. */ |
| 39 | + --vp-home-hero-name-color: var(--vp-c-text-1); |
| 40 | + |
| 41 | + /* Height reserved for the fixed version banner (layout-top slot). */ |
| 42 | + --vp-layout-top-height: 36px; |
| 43 | +} |
| 44 | + |
| 45 | +.dark { |
| 46 | + /* Monochrome brand: near-white on dark backgrounds (material "slate"). */ |
| 47 | + --vp-c-brand-1: #e8e8e8; |
| 48 | + --vp-c-brand-2: #cccccc; |
| 49 | + --vp-c-brand-3: #dddddd; |
| 50 | + --vp-c-brand-soft: rgba(255, 255, 255, 0.12); |
| 51 | + |
| 52 | + --vp-c-text-link: #9db4e8; |
| 53 | + |
| 54 | + --vp-button-brand-bg: #e8e8e8; |
| 55 | + --vp-button-brand-border: #e8e8e8; |
| 56 | + --vp-button-brand-text: #1a1a1a; |
| 57 | + --vp-button-brand-hover-bg: #ffffff; |
| 58 | + --vp-button-brand-hover-border: #ffffff; |
| 59 | + --vp-button-brand-hover-text: #1a1a1a; |
| 60 | + --vp-button-brand-active-bg: #cccccc; |
| 61 | + --vp-button-brand-active-border: #cccccc; |
| 62 | + --vp-button-brand-active-text: #1a1a1a; |
| 63 | +} |
| 64 | + |
| 65 | +/* Links: restrained accent, underline on hover only (material-ish). */ |
| 66 | +.vp-doc a { |
| 67 | + color: var(--vp-c-text-link); |
| 68 | + text-decoration: none; |
| 69 | + font-weight: 500; |
| 70 | +} |
| 71 | + |
| 72 | +.vp-doc a:hover { |
| 73 | + text-decoration: underline; |
| 74 | +} |
| 75 | + |
| 76 | +/* ------------------------------------------------------------- admonitions */ |
| 77 | + |
| 78 | +/* |
| 79 | + * Material-style admonitions: left accent border + tinted background. |
| 80 | + * Covers VitePress custom containers and GitHub-style alerts (> [!NOTE] …), |
| 81 | + * which VitePress renders with the same .custom-block classes. |
| 82 | + */ |
| 83 | +.vp-doc .custom-block { |
| 84 | + border: none; |
| 85 | + border-left: 4px solid var(--vp-c-divider); |
| 86 | + border-radius: 2px; |
| 87 | + padding: 12px 16px; |
| 88 | +} |
| 89 | + |
| 90 | +.vp-doc .custom-block .custom-block-title { |
| 91 | + font-weight: 700; |
| 92 | +} |
| 93 | + |
| 94 | +.vp-doc .custom-block.info, |
| 95 | +.vp-doc .custom-block.note { |
| 96 | + border-left-color: #448aff; |
| 97 | + background-color: rgba(68, 138, 255, 0.08); |
| 98 | +} |
| 99 | + |
| 100 | +.vp-doc .custom-block.tip, |
| 101 | +.vp-doc .custom-block.important { |
| 102 | + border-left-color: #00bfa5; |
| 103 | + background-color: rgba(0, 191, 165, 0.08); |
| 104 | +} |
| 105 | + |
| 106 | +.vp-doc .custom-block.warning, |
| 107 | +.vp-doc .custom-block.caution { |
| 108 | + border-left-color: #ff9100; |
| 109 | + background-color: rgba(255, 145, 0, 0.08); |
| 110 | +} |
| 111 | + |
| 112 | +.vp-doc .custom-block.danger { |
| 113 | + border-left-color: #ff5252; |
| 114 | + background-color: rgba(255, 82, 82, 0.08); |
| 115 | +} |
| 116 | + |
| 117 | +.vp-doc .custom-block.details { |
| 118 | + border-left-color: var(--vp-c-divider); |
| 119 | + background-color: var(--vp-c-bg-soft); |
| 120 | +} |
| 121 | + |
| 122 | +/* -------------------------------------------------------------- the banner */ |
| 123 | + |
| 124 | +.version-banner { |
| 125 | + position: fixed; |
| 126 | + top: 0; |
| 127 | + left: 0; |
| 128 | + right: 0; |
| 129 | + z-index: 35; |
| 130 | + height: var(--vp-layout-top-height); |
| 131 | + display: flex; |
| 132 | + align-items: center; |
| 133 | + justify-content: center; |
| 134 | + padding: 0 16px; |
| 135 | + overflow: hidden; |
| 136 | + background-color: var(--vp-c-bg-soft); |
| 137 | + border-bottom: 1px solid var(--vp-c-divider); |
| 138 | + color: var(--vp-c-text-2); |
| 139 | + font-size: 13px; |
| 140 | + line-height: 1.3; |
| 141 | + text-align: center; |
| 142 | +} |
| 143 | + |
| 144 | +.version-banner a { |
| 145 | + color: var(--vp-c-text-1); |
| 146 | + text-decoration: underline; |
| 147 | + margin-left: 4px; |
| 148 | +} |
0 commit comments