chore: tooltip tweaks (#11716)

* chore: tooltip tweaks

* fix tooltip background

* light/dark mode fix
pull/11724/head
Rich Harris 1 year ago committed by GitHub
parent 881040fb78
commit a17e84b61f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -286,25 +286,26 @@
.cm-tooltip { .cm-tooltip {
border: none; border: none;
background-color: transparent; background: var(--sk-back-3);
font-family: var(--sk-font); font-family: var(--sk-font);
max-width: calc(100vw - 10em); max-width: calc(100vw - 10em);
position: relative; position: relative;
filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.1));
} }
.cm-tooltip-section { .cm-tooltip-section {
position: relative; position: relative;
padding: 0.5em; padding: 0.5em;
/* width: calc(100vw - 10em); */ left: -13px;
filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.1));
background: var(--bg); background: var(--bg);
border-radius: 2px; border-radius: 2px;
max-width: 64em;
} }
.cm-tooltip-section::before { .cm-tooltip-section::before {
content: ''; content: '';
position: absolute; position: absolute;
left: 20px; left: 10px;
width: 8px; width: 8px;
height: 8px; height: 8px;
transform: rotate(45deg); transform: rotate(45deg);
@ -328,6 +329,10 @@
bottom: -4px; bottom: -4px;
} }
.cm-tooltip:has(.cm-diagnostic) {
background: transparent;
}
.cm-tooltip:has(.cm-diagnostic-warning) { .cm-tooltip:has(.cm-diagnostic-warning) {
--bg: var(--warning); --bg: var(--warning);
--fg: #222; --fg: #222;

Loading…
Cancel
Save