Skip to content

feat: add custom scrollbar with existing theme #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
:root {
--primary-color: #8034e4;
--secondary-color: #7202bb;
}

*,
body {
font-family: "Open Sans";
@import "App";
}

/* --------------Custom Scrollbar---------------------- */

/* Webkit-based browsers */
::-webkit-scrollbar {
width: 0.8rem; /* Width of the entire scrollbar */
}

::-webkit-scrollbar-track {
background: transparent;
// margin-block: 0.4em;
}

// Another secondary color: E638EAFF
::-webkit-scrollbar-thumb {
background: linear-gradient(var(--primary-color), var(--secondary-color));
background-clip: content-box;
border: 0.21em solid transparent;
border-radius: 100px;
}

/* Firefox */
* {
scrollbar-width: thin;
scrollbar-color: var(--primary-color) var(--secondary-color);
}

/* Internet Explorer and Microsoft Edge */
*::-ms-scrollbar {
width: 0.8rem;
}

*::-ms-scrollbar-track {
background: transparent;
}

*::-ms-scrollbar-thumb {
background: linear-gradient(var(--primary-color), var(--secondary-color));
background-clip: content-box;
border: 0.21em solid transparent;
border-radius: 100px;
}