Skip to content

Commit

Permalink
💄 Add custom scrollbar style
Browse files Browse the repository at this point in the history
Display scrollbar all the time and modify scrollbar style. This is to avoid layout shift on different page length _ especially on Search page.
  • Loading branch information
satnaing committed Nov 6, 2022
1 parent 1897260 commit 1f53cfa
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,33 @@

@layer base {
html {
@apply scroll-smooth;
@apply scroll-smooth overflow-y-scroll;
}

body {
@apply font-sans;
}

/* ===== Custom Scrollbar ===== */
/* width */
::-webkit-scrollbar {
@apply w-3;
}

/* Track */
::-webkit-scrollbar-track {
@apply bg-bglight dark:bg-bgdark;
}

/* Handle */
::-webkit-scrollbar-thumb {
@apply bg-[#d5d5d5] dark:bg-carddark;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
@apply bg-[#b7b7b7] dark:bg-[#17222b];
}
}

@layer components {
Expand Down

1 comment on commit 1f53cfa

@vercel
Copy link

@vercel vercel bot commented on 1f53cfa Nov 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sat-naing-portfolio – ./

sat-naing-portfolio-satnaing.vercel.app
sat-naing-portfolio-git-deployment-satnaing.vercel.app
satnaing.vercel.app

Please sign in to comment.