|
1 | 1 | /* ===== Basic ===== */
|
2 | 2 | :root {
|
3 | 3 | --twoslash-border-color: #8888;
|
4 |
| - --twoslash-docs-color: #888; |
5 | 4 | --twoslash-underline-color: currentColor;
|
6 | 5 | --twoslash-highlighted-border: #c37d0d50;
|
7 | 6 | --twoslash-highlighted-bg: #c37d0d20;
|
8 | 7 | --twoslash-popup-bg: #f8f8f8;
|
9 |
| - --twoslash-popup-shadow: rgba(0, 0, 0, 0.08) 0px 1px 4px; |
| 8 | + --twoslash-popup-color: inherit; |
| 9 | + --twoslash-popup-shadow: rgba(0, 0, 0.08) 0px 1px 4px; |
| 10 | + --twoslash-docs-color: #888; |
| 11 | + --twoslash-docs-font: sans-serif; |
| 12 | + --twoslach-code-font: inherit; |
10 | 13 | --twoslash-matched-color: inherit;
|
11 | 14 | --twoslash-unmatched-color: #888;
|
12 | 15 | --twoslash-cursor-color: #8888;
|
|
46 | 49 | flex-direction: column;
|
47 | 50 | transform: translateY(1.1em);
|
48 | 51 | background: var(--twoslash-popup-bg);
|
| 52 | + color: var(--twoslash-popup-color); |
49 | 53 | border: 1px solid var(--twoslash-border-color);
|
50 | 54 | transition: opacity 0.3s;
|
51 | 55 | border-radius: 4px;
|
|
89 | 93 | padding: 6px 8px !important;
|
90 | 94 | }
|
91 | 95 |
|
| 96 | +.twoslash .twoslash-popup-code { |
| 97 | + font-family: var(--twoslach-code-font); |
| 98 | +} |
| 99 | + |
92 | 100 | .twoslash .twoslash-popup-docs {
|
93 | 101 | color: var(--twoslash-docs-color);
|
94 |
| - font-family: sans-serif; |
| 102 | + font-family: var(--twoslash-docs-font); |
95 | 103 | font-size: 0.8em;
|
96 | 104 | border-top: 1px solid var(--twoslash-border-color);
|
97 | 105 | }
|
98 | 106 |
|
99 | 107 | .twoslash .twoslash-popup-docs-tags {
|
100 | 108 | display: flex;
|
101 | 109 | flex-direction: column;
|
| 110 | + font-family: var(--twoslash-docs-font); |
102 | 111 | }
|
103 | 112 |
|
104 | 113 | .twoslash .twoslash-popup-docs-tags,
|
105 | 114 | .twoslash .twoslash-popup-docs-tag-name {
|
106 | 115 | margin-right: 0.5em;
|
107 | 116 | }
|
108 | 117 |
|
| 118 | +.twoslash .twoslash-popup-docs-tag-name { |
| 119 | + font-family: var(--twoslach-code-font); |
| 120 | +} |
| 121 | + |
109 | 122 | /* ===== Error Line ===== */
|
110 | 123 | .twoslash .twoslash-error-line {
|
111 | 124 | position: relative;
|
|
126 | 139 | .twoslash .twoslash-completion-cursor {
|
127 | 140 | position: relative;
|
128 | 141 | }
|
| 142 | + |
129 | 143 | .twoslash .twoslash-completion-cursor .twoslash-completion-list {
|
130 | 144 | user-select: none;
|
131 | 145 | position: absolute;
|
|
139 | 153 | background: var(--twoslash-popup-bg);
|
140 | 154 | border: 1px solid var(--twoslash-border-color);
|
141 | 155 | }
|
| 156 | + |
142 | 157 | .twoslash-completion-list {
|
143 | 158 | width: 240px;
|
144 | 159 | font-size: 0.8rem;
|
|
147 | 162 | flex-direction: column;
|
148 | 163 | gap: 4px;
|
149 | 164 | }
|
| 165 | + |
150 | 166 | .twoslash-completion-list:hover {
|
151 | 167 | user-select: auto;
|
152 | 168 | }
|
| 169 | + |
153 | 170 | .twoslash-completion-list::before {
|
154 | 171 | background-color: var(--twoslash-cursor-color);
|
155 | 172 | width: 2px;
|
|
159 | 176 | left: -1px;
|
160 | 177 | content: ' ';
|
161 | 178 | }
|
| 179 | + |
162 | 180 | .twoslash-completion-list li {
|
163 | 181 | overflow: hidden;
|
164 | 182 | display: flex;
|
165 | 183 | align-items: center;
|
166 | 184 | gap: 0.25em;
|
167 | 185 | line-height: 1em;
|
168 | 186 | }
|
| 187 | + |
169 | 188 | .twoslash-completion-list li span.twoslash-completions-unmatched {
|
170 | 189 | color: var(--twoslash-unmatched-color);
|
171 | 190 | }
|
| 191 | + |
172 | 192 | .twoslash-completion-list .deprecated {
|
173 | 193 | text-decoration: line-through;
|
174 | 194 | opacity: 0.5;
|
175 | 195 | }
|
| 196 | + |
176 | 197 | .twoslash-completion-list li span.twoslash-completions-matched {
|
177 | 198 | color: var(--twoslash-matched-color);
|
178 | 199 | }
|
| 200 | + |
179 | 201 | /* Highlights */
|
180 | 202 | .twoslash-highlighted {
|
181 | 203 | background-color: var(--twoslash-highlighted-bg);
|
|
184 | 206 | margin: -1px -3px;
|
185 | 207 | border-radius: 4px;
|
186 | 208 | }
|
| 209 | + |
187 | 210 | /* Icons */
|
188 | 211 | .twoslash-completion-list .twoslash-completions-icon {
|
189 | 212 | color: var(--twoslash-unmatched-color);
|
190 | 213 | width: 1em;
|
191 | 214 | flex: none;
|
192 | 215 | }
|
| 216 | + |
193 | 217 | /* Custom Tags */
|
194 | 218 | .twoslash .twoslash-tag-line {
|
195 | 219 | position: relative;
|
|
202 | 226 | align-items: center;
|
203 | 227 | gap: 0.3em;
|
204 | 228 | }
|
| 229 | + |
205 | 230 | .twoslash .twoslash-tag-line .twoslash-tag-icon {
|
206 | 231 | width: 1.1em;
|
207 | 232 | color: inherit;
|
208 | 233 | }
|
| 234 | + |
209 | 235 | .twoslash .twoslash-tag-line.twoslash-tag-error-line {
|
210 | 236 | background-color: var(--twoslash-error-bg);
|
211 | 237 | border-left: 3px solid var(--twoslash-error-color);
|
212 | 238 | color: var(--twoslash-error-color);
|
213 | 239 | }
|
| 240 | + |
214 | 241 | .twoslash .twoslash-tag-line.twoslash-tag-warn-line {
|
215 | 242 | background-color: var(--twoslash-tag-warn-bg);
|
216 | 243 | border-left: 3px solid var(--twoslash-tag-warn-color);
|
217 | 244 | color: var(--twoslash-tag-warn-color);
|
218 | 245 | }
|
| 246 | + |
219 | 247 | .twoslash .twoslash-tag-line.twoslash-tag-annotate-line {
|
220 | 248 | background-color: var(--twoslash-tag-annotate-bg);
|
221 | 249 | border-left: 3px solid var(--twoslash-tag-annotate-color);
|
|
0 commit comments