Skip to content

Commit

Permalink
feat: customize scrollbar
Browse files Browse the repository at this point in the history
  • Loading branch information
kunish committed Sep 6, 2023
1 parent 474d4da commit c27b192
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const Header = () => {
const [openedDrawer, setOpenedDrawer] = createSignal(false)

return (
<ul class="navbar rounded-box sticky inset-x-0 top-0 z-50 flex w-auto items-center justify-center bg-base-300 px-4">
<ul class="navbar sticky inset-x-0 top-0 z-50 flex w-auto items-center justify-center bg-base-300 px-4">
<div class="navbar-start gap-4">
<div class={twMerge('drawer w-auto lg:hidden', '')}>
<input
Expand Down
19 changes: 18 additions & 1 deletion src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@
src: url('assets/Twemoji.Mozilla.ttf') format('truetype');
}

:root {
scrollbar-width: thin;
scrollbar-color: hsl(var(--p)) transparent;
}

::-webkit-scrollbar {
display: none;
background: transparent;
}

::-webkit-scrollbar-thumb {
@apply rounded-box bg-primary;
}

::-webkit-scrollbar:vertical {
width: 6px;
}

::-webkit-scrollbar:horizontal {
height: 6px;
}
2 changes: 1 addition & 1 deletion src/pages/Connections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export default () => {
]

return (
<div class="flex h-full flex-col gap-4 p-1">
<div class="flex h-full flex-col gap-2 p-1">
<div class="tabs-boxed tabs gap-2">
<For each={tabs()}>
{(tab) => (
Expand Down

0 comments on commit c27b192

Please sign in to comment.