Skip to content

Commit

Permalink
Merge pull request #459 from alejperez99/feature/scrollbar-webkit-not…
Browse files Browse the repository at this point in the history
…-supported

feat: add scrollbar style when webkit-scrollbar is not supported
  • Loading branch information
midudev authored Mar 12, 2024
2 parents 2cbc0b3 + ed7ae59 commit caeff0c
Showing 1 changed file with 29 additions and 20 deletions.
49 changes: 29 additions & 20 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -80,28 +80,37 @@ scroll-behavior: smooth;
width: 1px;
}

::-webkit-scrollbar {
width: 10px;
border-radius: 10px;
@supports selector(::-webkit-scrollbar) {
::-webkit-scrollbar {
width: 10px;
border-radius: 10px;
}

::-webkit-scrollbar-thumb {
border-radius: 10px;
background-color: theme("colors.primary");
border: 2px solid transparent;
background-clip: content-box;
}

::-webkit-scrollbar-thumb:active {
background-color: #666;
}

::-webkit-scrollbar-track {
background: var(--background-image);
}

::-webkit-scrollbar-corner {
background: var(--background-image);
}
}

::-webkit-scrollbar-thumb {
border-radius: 10px;
background-color: theme("colors.primary");
border: 2px solid transparent;
background-clip: content-box;
}

::-webkit-scrollbar-thumb:active {
background-color: #666;
}

::-webkit-scrollbar-track {
background: var(--background-image);
}

::-webkit-scrollbar-corner {
background: var(--background-image);
@supports not selector(::-webkit-scrollbar) {
* {
scrollbar-color: theme("colors.primary") transparent;
scrollbar-width: thin;
}
}
</style>
</body>
Expand Down

0 comments on commit caeff0c

Please sign in to comment.