Skip to content

Commit

Permalink
Merge pull request #428 from SrijaVuppala295/scrollbar
Browse files Browse the repository at this point in the history
Enhancing the UI of Scrollbar with Gradient Colors, Hover Effects, and Dark Mode Support
  • Loading branch information
sakeel-103 authored Oct 28, 2024
2 parents 15a2603 + b746977 commit 0cbeb96
Show file tree
Hide file tree
Showing 6 changed files with 179 additions and 3 deletions.
23 changes: 23 additions & 0 deletions src/app/components/aboutUs-page/aboutUs.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,29 @@ body {
flex-direction: column;
min-height: 100vh;
}
/* For WebKit browsers (Chrome, Safari) */
::-webkit-scrollbar {
width: 10px; /* Width of the scrollbar */
}

::-webkit-scrollbar-track {
background: #f0f0f0; /* Background of the track */
}

::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, #ff66b2, #8a2be2); /* Pink to Violet gradient */
border-radius: 10px; /* Rounded corners for the scrollbar thumb */
}

::-webkit-scrollbar-thumb:hover {
background: linear-gradient(180deg, #ff99cc, #9b59b6); /* Lighter gradient on hover */
}

/* For Firefox */
html {
scrollbar-width: thin; /* Makes the scrollbar thin */
scrollbar-color: #ff66b2 #f0f0f0; /* Color of the thumb and track */
}

/* Header Styling */
header {
Expand Down
24 changes: 24 additions & 0 deletions src/app/components/faq/faq.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,30 @@ font-family: Arial, sans-serif;
margin-top:30px
}

/* For WebKit browsers (Chrome, Safari) */
::-webkit-scrollbar {
width: 10px; /* Width of the scrollbar */
}

::-webkit-scrollbar-track {
background: #f0f0f0; /* Background of the track */
}

::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, #ff66b2, #8a2be2); /* Pink to Violet gradient */
border-radius: 10px; /* Rounded corners for the scrollbar thumb */
}

::-webkit-scrollbar-thumb:hover {
background: linear-gradient(180deg, #ff99cc, #9b59b6); /* Lighter gradient on hover */
}

/* For Firefox */
html {
scrollbar-width: thin; /* Makes the scrollbar thin */
scrollbar-color: #ff66b2 #f0f0f0; /* Color of the thumb and track */
}

.faq{
width: 800px;
margin-top: 5rem !important;
Expand Down
34 changes: 34 additions & 0 deletions src/app/components/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,40 @@
height: 25px;
width: 25px;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

html, body {
height: 100%; /* Ensure full height */
overflow: hidden; /* Prevent body scrolling */
}

/* For WebKit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
width: 12px; /* Width of the scrollbar */
}

::-webkit-scrollbar-track {
background: #f0f0f0; /* Background of the track */
}

::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, #ff66b2, #8a2be2); /* Pink to Violet gradient */
border-radius: 10px; /* Rounded corners for the scrollbar thumb */
}

::-webkit-scrollbar-thumb:hover {
background: linear-gradient(180deg, #ff99cc, #9b59b6); /* Lighter gradient on hover */
}

/* For Firefox */
html {
scrollbar-width: thin; /* Makes the scrollbar thin */
scrollbar-color: #ff66b2 #800ab3; /* Color of the thumb and track */
}


</style>
Expand Down
24 changes: 24 additions & 0 deletions src/app/components/header/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,30 @@
padding: 0;
box-sizing: border-box;
}
/* For WebKit browsers (Chrome, Safari) */
::-webkit-scrollbar {
width: 10px; /* Width of the scrollbar */
}

::-webkit-scrollbar-track {
background: #aa1313; /* Background of the track */
}

::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, #ff66b2, #8a2be2); /* Pink to Violet gradient */
border-radius: 10px; /* Rounded corners for the scrollbar thumb */
}

::-webkit-scrollbar-thumb:hover {
background: linear-gradient(180deg, #ff99cc, #9b59b6); /* Lighter gradient on hover */
}

/* For Firefox */
html {
scrollbar-width: thin; /* Makes the scrollbar thin */
scrollbar-color: #ff66b2 #f0f0f0; /* Color of the thumb and track */
}


body {
font-family: "Inter", sans-serif;
Expand Down
23 changes: 23 additions & 0 deletions src/app/components/quiz/quiz.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,29 @@
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
/* For WebKit browsers (Chrome, Safari) */
::-webkit-scrollbar {
width: 10px; /* Width of the scrollbar */
}

::-webkit-scrollbar-track {
background: #f0f0f0; /* Background of the track */
}

::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, #ff66b2, #8a2be2); /* Pink to Violet gradient */
border-radius: 10px; /* Rounded corners for the scrollbar thumb */
}

::-webkit-scrollbar-thumb:hover {
background: linear-gradient(180deg, #ff99cc, #9b59b6); /* Lighter gradient on hover */
}

/* For Firefox */
html {
scrollbar-width: thin; /* Makes the scrollbar thin */
scrollbar-color: #ff66b2 #f0f0f0; /* Color of the thumb and track */
}

header {
text-align: center;
Expand Down
54 changes: 51 additions & 3 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,7 @@
z-index: 1001;
}

.toast.show {

}


/* Testimonials Section Styles */
.testimonials {
Expand Down Expand Up @@ -611,6 +609,56 @@ <h2>Contact Us</h2>

<!-- Add custom CSS for GTranslate -->
<style>
/* Global scrollbar styling for Firefox */
html {
scrollbar-width: auto; /* Firefox: auto for normal width */
scrollbar-color: #ff66b2 #f0f0f0; /* Initial color of the thumb and track */
}

/* For WebKit browsers (Chrome, Safari) */
html::-webkit-scrollbar {
width: 24px; /* Width of the scrollbar */
height: 24px; /* Height of the scrollbar (for horizontal scrollbar) */
}

html::-webkit-scrollbar-thumb {
background-color: #ff66b2; /* Initial color of the scrollbar thumb */
border-radius: 12px; /* Rounded corners for the scrollbar thumb */
transition: background-color 0.3s; /* Smooth transition for hover effect */
}

html::-webkit-scrollbar-track {
background-color: #f0f0f0; /* Initial color of the scrollbar track */
border-radius: 12px; /* Rounded corners for the scrollbar track */
}

/* Hover effect for scrollbar thumb */
html::-webkit-scrollbar-thumb:hover {
background-color: #ff3399; /* Change thumb color on hover */
}

/* Hover effect for scrollbar track */
html::-webkit-scrollbar-track:hover {
background-color: #e0e0e0; /* Change track color on hover */
}


/* Dark mode or night-time styling (optional) */
@media (prefers-color-scheme: dark) {
html {
scrollbar-color: #6911a8 #df50e1a4; /* Change scrollbar color for dark mode (Firefox) */
}

::-webkit-scrollbar-track {
background: hsl(222, 81%, 47%); /* Dark gray track in dark mode */
}

::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, #ff66b2, #8a2be2); /* Gradient works in dark mode too */
}
}


.gtranslate_wrapper {
position: fixed !important;
left: 10px !important;
Expand Down

0 comments on commit 0cbeb96

Please sign in to comment.