Skip to content

Commit a17e84b

Browse files
authored
chore: tooltip tweaks (#11716)
* chore: tooltip tweaks * fix tooltip background * light/dark mode fix
1 parent 881040f commit a17e84b

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

sites/svelte-5-preview/src/lib/CodeMirror.svelte

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,25 +286,26 @@
286286
287287
.cm-tooltip {
288288
border: none;
289-
background-color: transparent;
289+
background: var(--sk-back-3);
290290
font-family: var(--sk-font);
291291
max-width: calc(100vw - 10em);
292292
position: relative;
293+
filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.1));
293294
}
294295
295296
.cm-tooltip-section {
296297
position: relative;
297298
padding: 0.5em;
298-
/* width: calc(100vw - 10em); */
299-
filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.1));
299+
left: -13px;
300300
background: var(--bg);
301301
border-radius: 2px;
302+
max-width: 64em;
302303
}
303304
304305
.cm-tooltip-section::before {
305306
content: '';
306307
position: absolute;
307-
left: 20px;
308+
left: 10px;
308309
width: 8px;
309310
height: 8px;
310311
transform: rotate(45deg);
@@ -328,6 +329,10 @@
328329
bottom: -4px;
329330
}
330331
332+
.cm-tooltip:has(.cm-diagnostic) {
333+
background: transparent;
334+
}
335+
331336
.cm-tooltip:has(.cm-diagnostic-warning) {
332337
--bg: var(--warning);
333338
--fg: #222;

0 commit comments

Comments
 (0)