main
css 192 lines 7.67 KB
Raw
1 /* Warning for latest docs */
2 .md-banner {
3 background-color: var(--md-warning-bg-color);
4 color: var(--md-warning-fg-color);
5 }
6
7 /* https://christianoliff.com/blog/styling-external-links-with-an-icon-in-css/ */
8 a:not(:has(svg)):not(.md-icon):not(.autorefs-external) {
9 align-items: center;
10
11 &[href^="//"]::after,
12 &[href^="http://"]::after,
13 &[href^="https://"]::after {
14 content: "";
15 width: 12px;
16 height: 12px;
17 margin-left: 4px;
18 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' stroke='gray' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");
19 background-position: center;
20 background-repeat: no-repeat;
21 background-size: contain;
22 display: inline-block;
23 }
24 }
25
26 a[href*="localhost"]::after,
27 a[href*="127.0.0.1"]::after,
28 a[href*="org.readthedocs.build"]::after,
29 a[href*="docs.vllm.ai"]::after {
30 display: none !important;
31 }
32
33 /* Light mode: darker section titles */
34 body[data-md-color-scheme="default"] .md-nav__item--section > label.md-nav__link .md-ellipsis {
35 color: rgba(0, 0, 0, 0.7) !important;
36 font-weight: 700;
37 }
38
39 /* Dark mode: lighter gray section titles */
40 body[data-md-color-scheme="slate"] .md-nav__item--section > label.md-nav__link .md-ellipsis {
41 color: rgba(255, 255, 255, 0.75) !important;
42 font-weight: 700;
43 }
44
45 /* Custom admonitions */
46 :root {
47 --md-admonition-icon--announcement: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M3.25 9a.75.75 0 0 1 .75.75c0 2.142.456 3.828.733 4.653a.122.122 0 0 0 .05.064.212.212 0 0 0 .117.033h1.31c.085 0 .18-.042.258-.152a.45.45 0 0 0 .075-.366A16.743 16.743 0 0 1 6 9.75a.75.75 0 0 1 1.5 0c0 1.588.25 2.926.494 3.85.293 1.113-.504 2.4-1.783 2.4H4.9c-.686 0-1.35-.41-1.589-1.12A16.4 16.4 0 0 1 2.5 9.75.75.75 0 0 1 3.25 9Z"></path><path d="M0 6a4 4 0 0 1 4-4h2.75a.75.75 0 0 1 .75.75v6.5a.75.75 0 0 1-.75.75H4a4 4 0 0 1-4-4Zm4-2.5a2.5 2.5 0 1 0 0 5h2v-5Z"></path><path d="M15.59.082A.75.75 0 0 1 16 .75v10.5a.75.75 0 0 1-1.189.608l-.002-.001h.001l-.014-.01a5.775 5.775 0 0 0-.422-.25 10.63 10.63 0 0 0-1.469-.64C11.576 10.484 9.536 10 6.75 10a.75.75 0 0 1 0-1.5c2.964 0 5.174.516 6.658 1.043.423.151.787.302 1.092.443V2.014c-.305.14-.669.292-1.092.443C11.924 2.984 9.713 3.5 6.75 3.5a.75.75 0 0 1 0-1.5c2.786 0 4.826-.484 6.155-.957.665-.236 1.154-.47 1.47-.64.144-.077.284-.161.421-.25l.014-.01a.75.75 0 0 1 .78-.061Z"></path></svg>');
48 --md-admonition-icon--important: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>');
49 --md-admonition-icon--code: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.75.75 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.75.75 0 0 1 .734.215m-6.56 0a.75.75 0 0 1 1.042.018.75.75 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.75.75 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"/></svg>');
50 --md-admonition-icon--console: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0 1 14.25 15H1.75A1.75 1.75 0 0 1 0 13.25Zm1.75-.25a.25.25 0 0 0-.25.25v10.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V2.75a.25.25 0 0 0-.25-.25ZM7.25 8a.75.75 0 0 1-.22.53l-2.25 2.25a.749.749 0 0 1-1.275-.326.75.75 0 0 1 .215-.734L5.44 8 3.72 6.28a.749.749 0 0 1 .326-1.275.75.75 0 0 1 .734.215l2.25 2.25c.141.14.22.331.22.53m1.5 1.5h3a.75.75 0 0 1 0 1.5h-3a.75.75 0 0 1 0-1.5"/></svg>');
51 }
52
53 .md-typeset .admonition.announcement,
54 .md-typeset details.announcement {
55 border-color: rgb(255, 110, 66);
56 }
57 .md-typeset .admonition.important,
58 .md-typeset details.important {
59 border-color: rgb(239, 85, 82);
60 }
61 .md-typeset .admonition.code,
62 .md-typeset details.code {
63 border-color: #64dd17
64 }
65 .md-typeset .admonition.console,
66 .md-typeset details.console {
67 border-color: #64dd17
68 }
69
70 .md-typeset .announcement > .admonition-title,
71 .md-typeset .announcement > summary {
72 background-color: rgb(255, 110, 66, 0.1);
73 }
74 .md-typeset .important > .admonition-title,
75 .md-typeset .important > summary {
76 background-color: rgb(239, 85, 82, 0.1);
77 }
78 .md-typeset .code > .admonition-title,
79 .md-typeset .code > summary {
80 background-color: #64dd171a;
81 }
82 .md-typeset .console > .admonition-title,
83 .md-typeset .console > summary {
84 background-color: #64dd171a;
85 }
86
87 .md-typeset .announcement > .admonition-title::before,
88 .md-typeset .announcement > summary::before {
89 background-color: rgb(239, 85, 82);
90 -webkit-mask-image: var(--md-admonition-icon--announcement);
91 mask-image: var(--md-admonition-icon--announcement);
92 }
93 .md-typeset .important > .admonition-title::before,
94 .md-typeset .important > summary::before {
95 background-color: rgb(239, 85, 82);
96 -webkit-mask-image: var(--md-admonition-icon--important);
97 mask-image: var(--md-admonition-icon--important);
98 }
99 .md-typeset .code > .admonition-title::before,
100 .md-typeset .code > summary::before {
101 background-color: #64dd17;
102 -webkit-mask-image: var(--md-admonition-icon--code);
103 mask-image: var(--md-admonition-icon--code);
104 }
105 .md-typeset .console > .admonition-title::before,
106 .md-typeset .console > summary::before {
107 background-color: #64dd17;
108 -webkit-mask-image: var(--md-admonition-icon--console);
109 mask-image: var(--md-admonition-icon--console);
110 }
111
112 /* Make label fully visible on hover */
113 .md-content__button[href*="edit"]:hover::after {
114 opacity: 1;
115 }
116
117 /* Hide edit button on generated docs/examples pages */
118 @media (min-width: 960px) {
119 .md-content__button[href*="docs/examples/"] {
120 display: none !important;
121 }
122 }
123
124 .md-content__button-wrapper {
125 position: absolute;
126 top: 0.6rem;
127 right: 0.8rem;
128 display: flex;
129 flex-direction: row;
130 align-items: center;
131 gap: 0.4rem;
132 z-index: 1;
133 }
134
135 .md-content__button-wrapper a {
136 display: inline-flex;
137 align-items: center;
138 justify-content: center;
139 height: 24px;
140 width: 24px;
141 color: var(--md-default-fg-color);
142 text-decoration: none;
143 }
144
145 .md-content__button-wrapper a:hover {
146 color: var(--md-accent-fg-color);
147 }
148
149 /* Slack and Forum css */
150 .slack-button,
151 .forum-button {
152 display: inline-flex;
153 align-items: center;
154 justify-content: center;
155 margin-left: 0.4rem;
156 height: 24px;
157 }
158
159 .slack-button img {
160 height: 18px;
161 filter: none !important;
162 }
163
164 .slack-button:hover,
165 .forum-button:hover {
166 opacity: 0.7;
167 }
168
169 .forum-button svg {
170 height: 28px;
171 opacity: 0.9;
172 transform: translateY(2px);
173 }
174
175 /* For logo css */
176 [data-md-color-scheme="default"] .logo-dark {
177 display: none;
178 }
179
180 [data-md-color-scheme="slate"] .logo-light {
181 display: none;
182 }
183
184 /* Outline for content tabs */
185 .md-typeset .tabbed-set {
186 border: 0.075rem solid var(--md-default-fg-color);
187 border-radius: 0.2rem;
188 }
189
190 .md-typeset .tabbed-content {
191 padding: 0 0.6em;
192 }