feat(editor): widen query editor scrollbar on hover
This commit is contained in:
1 parent
0d8bf39414
commit
eeeb67e62c
1 file changed
+22
-5
@@ -2809,20 +2809,37 @@ defineExpose({
|
||||
contain: size layout style;
|
||||
}
|
||||
|
||||
/* Matches the geometry of the custom-drawn data grid scrollbars (DataGrid.vue):
|
||||
a fixed 10px track with a 4px visual thumb widening on hover/drag, transparent
|
||||
track, capsule thumb, colors from the same --foreground color-mix. The thin
|
||||
idle look comes from a transparent border (background-clip: padding-box);
|
||||
hover drops the border to fill the full track. Partial border widths are not
|
||||
honored on scrollbar part state changes, so the hover endpoint is the full
|
||||
10px track rather than the grid's 6px. Changing the track width on hover
|
||||
would squeeze the content and cause a reflow flicker, so it stays constant. */
|
||||
[data-query-editor-root] :deep(.cm-scroller::-webkit-scrollbar) {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
[data-query-editor-root] :deep(.cm-scroller::-webkit-scrollbar-track) {
|
||||
background: rgba(127, 127, 127, 0.1);
|
||||
[data-query-editor-root] :deep(.cm-scroller::-webkit-scrollbar-track),
|
||||
[data-query-editor-root] :deep(.cm-scroller::-webkit-scrollbar-corner) {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
[data-query-editor-root] :deep(.cm-scroller::-webkit-scrollbar-thumb) {
|
||||
background: rgba(127, 127, 127, 0.7);
|
||||
background: color-mix(in oklch, var(--foreground) 30%, transparent);
|
||||
background-clip: padding-box;
|
||||
border: 3px solid transparent;
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
[data-query-editor-root] :deep(.cm-scroller::-webkit-scrollbar-thumb:hover),
|
||||
[data-query-editor-root] :deep(.cm-scroller::-webkit-scrollbar-thumb:active) {
|
||||
background: color-mix(in oklch, var(--foreground) 48%, transparent);
|
||||
border: 0 solid transparent;
|
||||
}
|
||||
|
||||
@supports not selector(::-webkit-scrollbar) {
|
||||
[data-query-editor-root] :deep(.cm-scroller) {
|
||||
scrollbar-width: thin;
|
||||
|
||||
Reference in new issue
Block a user