Skip to content

Commit bd3f020

Browse files
authored
[Style] Add custom scrollbar styling for SelectBox components (#5879)
1 parent fb66637 commit bd3f020

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

packages/design-system/src/css/style.css

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,42 @@
324324
}
325325
}
326326

327-
/* Everything below here to be cleaned up over time. */
327+
328+
/* ===================== Scrollbar Utilities (Tailwind) =====================
329+
Usage: Add `scrollbar-custom` class to scrollable containers.
330+
The scrollbar styling adapts to light/dark theme automatically.
331+
============================================================================ */
332+
333+
@utility scrollbar-custom {
334+
overflow-y: auto;
335+
/* Firefox */
336+
scrollbar-width: thin;
337+
scrollbar-color: var(--dialog-surface) transparent;
338+
339+
/* WebKit */
340+
&::-webkit-scrollbar {
341+
width: 10px;
342+
height: 10px;
343+
background-color: transparent;
344+
}
345+
&::-webkit-scrollbar-track {
346+
background: transparent;
347+
}
348+
&::-webkit-scrollbar-thumb {
349+
background: var(--dialog-surface);
350+
border-radius: 9999px;
351+
border: 2px solid transparent;
352+
}
353+
&::-webkit-scrollbar-thumb:hover {
354+
background: var(--dialog-surface);
355+
}
356+
&::-webkit-scrollbar-corner {
357+
background: transparent;
358+
}
359+
}
360+
/* =================== End Custom Scrollbar (cross-browser) =================== */
361+
362+
/* Everthing below here to be cleaned up over time. */
328363

329364
body {
330365
width: 100vw;

src/components/input/MultiSelect.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ const pt = computed(() => ({
243243
},
244244
listContainer: () => ({
245245
style: { maxHeight: listMaxHeight },
246-
class: 'overflow-y-auto scrollbar-hide'
246+
class: 'scrollbar-custom'
247247
}),
248248
list: {
249249
class: 'flex flex-col gap-0 p-0 m-0 list-none border-none text-sm'

src/components/input/SingleSelect.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ const pt = computed(() => ({
159159
},
160160
listContainer: () => ({
161161
style: `max-height: ${listMaxHeight}`,
162-
class: 'overflow-y-auto scrollbar-hide'
162+
class: 'scrollbar-custom'
163163
}),
164164
list: {
165165
class:

0 commit comments

Comments
 (0)