File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 8383
8484 --color-light : # fafafa ;
8585 --color-dark : # 2e2e2e ;
86- --color-gray : # D9D9D9 ;
86+ --color-gray : # d9d9d9 ;
8787
8888 /* Fonts */
8989 --text-xxs : 10px ;
303303 @apply desktop:text-[40px ];
304304 }
305305}
306+
307+ @layer utilities {
308+ @supports not selector(::-webkit-scrollbar ) {
309+ .scrollbar {
310+ scrollbar-color : var (--color-neutral-300 ) var (--color-neutral-100 );
311+
312+ @variant dark {
313+ scrollbar-color : var (--color-neutral-900 ) var (--color-neutral-600 );
314+ }
315+ }
316+ }
317+
318+ .scrollbar ::-webkit-scrollbar {
319+ @apply w-4;
320+ }
321+
322+ .scrollbar ::-webkit-scrollbar-track {
323+ @apply rounded-full bg-neutral-100 dark:bg-neutral-900;
324+ }
325+
326+ .scrollbar ::-webkit-scrollbar-thumb {
327+ @apply rounded-full bg-neutral-300 transition dark:bg-neutral-600;
328+ }
329+ .scrollbar ::-webkit-scrollbar-thumb : hover {
330+ @apply opacity-90;
331+ }
332+ }
Original file line number Diff line number Diff line change @@ -258,6 +258,11 @@ export function App() {
258258 } ,
259259 } }
260260 />
261+ < ShowComponent title = "Scroll bar " >
262+ < div className = "scrollbar mx-auto h-48 w-full overflow-auto" >
263+ < div className = "mx-auto flex h-96 w-20 items-center" > Container</ div >
264+ </ div >
265+ </ ShowComponent >
261266 </ div >
262267 ) ;
263268}
You can’t perform that action at this time.
0 commit comments