Skip to content

Commit

Permalink
Add custom scrollbar styles.
Browse files Browse the repository at this point in the history
  • Loading branch information
flachware committed Feb 27, 2017
1 parent 373dbfe commit a9c3998
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/stylesheets/components/_panel.scss
Expand Up @@ -44,4 +44,14 @@
margin-bottom: $space-min;
}
}

::-webkit {
&-track {
background: $panel-bg;
}

&-thumb {
border-color: $panel-bg;
}
}
}
12 changes: 12 additions & 0 deletions src/stylesheets/components/_sidebar.scss
Expand Up @@ -198,4 +198,16 @@
.icon-spin {
animation: spin 1.2s linear infinite;
}

::-webkit {
&-scrollbar {
&-track {
background: $sidebar-bg;
}

&-thumb {
border-color: $sidebar-bg;
}
}
}
}
31 changes: 31 additions & 0 deletions src/stylesheets/partials/_scrollbar.scss
@@ -0,0 +1,31 @@
//
// Scrollbar
// --------------------------------------------------

::-webkit {
&-scrollbar {
width: 12px;
height: 12px;

&:vertical {
margin-right: 20px;
}

&-track {
background: $scrollbar-bg;
}

&-thumb {
background: $scrollbar-color;
border-radius: 6px;
border: 4px solid $scrollbar-bg;
background-clip: content-box;

&:vertical {
&:active {
border: 0;
}
}
}
}
}
4 changes: 4 additions & 0 deletions src/stylesheets/themes/_dark.scss
Expand Up @@ -77,6 +77,10 @@ $stack-color: $shade-7; // Ok
$stack-bg: $body-bg; // Ok
$stack-focus-color: $brand-primary-light; // Ok

// Scrollbar
$scrollbar-bg: $body-bg; // Ok
$scrollbar-color: $shade-5; // Ok


// Components
// --------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions src/stylesheets/themes/_light.scss
Expand Up @@ -123,6 +123,10 @@ $stack-color: $shade-5;
$stack-bg: $body-bg;
$stack-focus-color: $shade-0;

// Scrollbar
$scrollbar-bg: $body-bg;
$scrollbar-color: $shade-4;


// Components
// --------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion src/stylesheets/windows/_project.scss
Expand Up @@ -66,4 +66,5 @@
"../partials/tile",
"../partials/sort-indicator",
"../partials/debug",
"../partials/scroll-container";
"../partials/scroll-container",
"../partials/scrollbar";

0 comments on commit a9c3998

Please sign in to comment.