Skip to content

Commit

Permalink
➕ allow scrollbar setting to be customized
Browse files Browse the repository at this point in the history
  • Loading branch information
ashfahan committed Oct 20, 2021
1 parent cec56ce commit 8ff0582
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/objects/_scrollbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@
//
.scrollbar {
&::-webkit-scrollbar {
width: 7px;
height: 7px;
background-color: $gray-100;
width: $scrollbar-width;
height: $scrollbar-height;
background-color: $scrollbar-background;
}

&::-webkit-scrollbar-track {
background-color: transparent;
}

&::-webkit-scrollbar-thumb {
border-radius: $borderradius-pill;
background-color: rgba($dark, .65);
border-radius: $scrollbar-thumb-radius;
background-color: $scrollbar-thumb-background;
}

// stylelint-disable-next-line selector-pseudo-class-disallowed-list
&::-webkit-scrollbar-thumb:focus {
background-color: $dark;
background-color: $scrollbar-thumb-focus-background;
}

// stylelint-disable-next-line selector-pseudo-class-disallowed-list
&::-webkit-scrollbar:hover {
background-color: $gray-200;
background-color: $scrollbar-hover-background;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/settings/_settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ $enable-experimental-css: true !default; // Enab

@import "./objects/grid";
@import "./objects/layout";
@import "./objects/scrollbar";
@import "./objects/containers";

//
Expand Down
19 changes: 19 additions & 0 deletions src/settings/objects/_scrollbar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// Containers Settings
//

//
// Inherit
//
$scrollbar-thumb-radius: $borderradius-pill !default;

//
// Setting
//
$scrollbar-width: 7px !default;
$scrollbar-height: 7px !default;
$scrollbar-background: $gray-100 !default;
$scrollbar-hover-background: $gray-200 !default;

$scrollbar-thumb-background: rgba($dark, .65) !default;
$scrollbar-thumb-focus-background: $dark !default;

0 comments on commit 8ff0582

Please sign in to comment.