Skip to content

Commit

Permalink
scrollbars improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
codecalm committed Nov 22, 2022
1 parent a33583f commit acd5fe1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/scss/layout/_navbar.scss
Expand Up @@ -54,8 +54,9 @@
@mixin navbar-dark {
--#{$prefix}navbar-border-color: #{$dark-mode-border-color};
--#{$prefix}navbar-bg: #{$dark};
--#{$prefix}scrollbar-color: var(--#{$prefix}white-rgb);
@include navbar-color($dark, $navbar-dark-color, $navbar-dark-brand-color, $navbar-dark-active-color, $navbar-dark-disabled-color, $navbar-dark-active-bg);
@include scrollbar;
//@include scrollbar;
}

@mixin navbar-vertical-nav {
Expand Down Expand Up @@ -386,7 +387,7 @@ Navbar vertical
z-index: $zindex-fixed;
align-items: flex-start;
@include transition(transform $transition-time);
overflow-x: auto;
overflow-y: scroll;
padding: 0;

&.navbar-right {
Expand Down
13 changes: 7 additions & 6 deletions src/scss/mixins/_mixins.scss
Expand Up @@ -15,22 +15,23 @@

@mixin scrollbar($color: var(--#{$prefix}body-color-rgb)) {
#{if(&, "&", "*")}::-webkit-scrollbar {
width: .5rem;
height: .5rem;
width: 1rem;
height: 1rem;
@include transition(background $transition-time);
}

#{if(&, "&", "*")}::-webkit-scrollbar-thumb {
border-radius: 5px;
background: rgba($color, .16);
border-radius: 1rem;
border: 5px solid transparent;
box-shadow: inset 0 0 0 1rem rgba(var(--#{$prefix}scrollbar-color, var(--#{$prefix}body-color-rgb)), .16);
}

#{if(&, "&", "*")}::-webkit-scrollbar-track {
background: rgba($color, .06);
background: transparent;
}

#{if(&, "&", "*")}:hover::-webkit-scrollbar-thumb {
background: rgba($color, .32);
box-shadow: inset 0 0 0 1rem rgba(var(--#{$prefix}scrollbar-color, var(--#{$prefix}body-color-rgb)), .32);
}

#{if(&, "&", "*")}::-webkit-scrollbar-corner {
Expand Down

1 comment on commit acd5fe1

@copulatrix
Copy link
Contributor

Choose a reason for hiding this comment

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

@codecalm Can you explain the improvements?

Please sign in to comment.