File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 11@import "@rustlanges/styles" ;
2+
3+ @layer utilities {
4+ @supports not selector(::-webkit-scrollbar ) {
5+ .scrollbar {
6+ scrollbar-color : var (--color-neutral-300 ) var (--color-neutral-100 );
7+
8+ @variant dark {
9+ scrollbar-color : var (--color-neutral-900 ) var (--color-neutral-600 );
10+ }
11+ }
12+ }
13+
14+ .scrollbar ::-webkit-scrollbar {
15+ @apply w-4;
16+ }
17+
18+ .scrollbar ::-webkit-scrollbar-track {
19+ @apply rounded-full bg-neutral-100 dark:bg-neutral-900;
20+ }
21+
22+ .scrollbar ::-webkit-scrollbar-thumb {
23+ @apply rounded-full bg-neutral-300 transition dark:bg-neutral-600;
24+ }
25+ .scrollbar ::-webkit-scrollbar-thumb : hover {
26+ @apply opacity-90;
27+ }
28+ }
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