mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 10:12:11 +00:00
[Style] Add custom scrollbar styling for SelectBox components (#5879)
This commit is contained in:
@@ -324,7 +324,42 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Everything below here to be cleaned up over time. */
|
|
||||||
|
/* ===================== Scrollbar Utilities (Tailwind) =====================
|
||||||
|
Usage: Add `scrollbar-custom` class to scrollable containers.
|
||||||
|
The scrollbar styling adapts to light/dark theme automatically.
|
||||||
|
============================================================================ */
|
||||||
|
|
||||||
|
@utility scrollbar-custom {
|
||||||
|
overflow-y: auto;
|
||||||
|
/* Firefox */
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: var(--dialog-surface) transparent;
|
||||||
|
|
||||||
|
/* WebKit */
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
&::-webkit-scrollbar-track {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
&::-webkit-scrollbar-thumb {
|
||||||
|
background: var(--dialog-surface);
|
||||||
|
border-radius: 9999px;
|
||||||
|
border: 2px solid transparent;
|
||||||
|
}
|
||||||
|
&::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: var(--dialog-surface);
|
||||||
|
}
|
||||||
|
&::-webkit-scrollbar-corner {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* =================== End Custom Scrollbar (cross-browser) =================== */
|
||||||
|
|
||||||
|
/* Everthing below here to be cleaned up over time. */
|
||||||
|
|
||||||
body {
|
body {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ const pt = computed(() => ({
|
|||||||
},
|
},
|
||||||
listContainer: () => ({
|
listContainer: () => ({
|
||||||
style: { maxHeight: listMaxHeight },
|
style: { maxHeight: listMaxHeight },
|
||||||
class: 'overflow-y-auto scrollbar-hide'
|
class: 'scrollbar-custom'
|
||||||
}),
|
}),
|
||||||
list: {
|
list: {
|
||||||
class: 'flex flex-col gap-0 p-0 m-0 list-none border-none text-sm'
|
class: 'flex flex-col gap-0 p-0 m-0 list-none border-none text-sm'
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ const pt = computed(() => ({
|
|||||||
},
|
},
|
||||||
listContainer: () => ({
|
listContainer: () => ({
|
||||||
style: `max-height: ${listMaxHeight}`,
|
style: `max-height: ${listMaxHeight}`,
|
||||||
class: 'overflow-y-auto scrollbar-hide'
|
class: 'scrollbar-custom'
|
||||||
}),
|
}),
|
||||||
list: {
|
list: {
|
||||||
class:
|
class:
|
||||||
|
|||||||
Reference in New Issue
Block a user