Skip to content

Commit

Permalink
Fix multiple backgrounds for scrollbars
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-Marcou committed Jan 31, 2021
1 parent 1cd2731 commit 755cb47
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ scrollableComponentTemplate.innerHTML = `
right: 0;
top: 0;
bottom: 0;
background: var(--scrollbar-fill-color) var(--vertical-scrollbar-background);
background: var(--vertical-scrollbar-background);
background-color: var(--scrollbar-fill-color);
background-size: var(--vertical-scrollbar-background-size);
}
.vertical-scrollbar.left-position {
Expand All @@ -119,7 +120,8 @@ scrollableComponentTemplate.innerHTML = `
left: 0;
right: 0;
bottom: 0;
background: var(--scrollbar-fill-color) var(--horizontal-scrollbar-background);
background: var(--horizontal-scrollbar-background);
background-color: var(--scrollbar-fill-color);
background-size: var(--horizontal-scrollbar-background-size);
}
.horizontal-scrollbar.top-position {
Expand Down Expand Up @@ -158,11 +160,13 @@ scrollableComponentTemplate.innerHTML = `
/* Scrollbar's strack */
.vertical-scrollbar .scrollbar-track {
background: var(--scrollbar-track-fill-color) var(--vertical-scrollbar-track-background);
background: var(--vertical-scrollbar-track-background);
background-color: var(--scrollbar-track-fill-color);
background-size: var(--vertical-scrollbar-track-background-size);
}
.horizontal-scrollbar .scrollbar-track {
background: var(--scrollbar-track-fill-color) var(--horizontal-scrollbar-track-background);
background: var(--horizontal-scrollbar-track-background);
background-color: var(--scrollbar-track-fill-color);
background-size: var(--horizontal-scrollbar-track-background-size);
}
.scrollbar-track:hover,
Expand All @@ -181,11 +185,13 @@ scrollableComponentTemplate.innerHTML = `
transition: background-color var(--fill-color-transition-duration) ease-out;
}
.vertical-scrollbar .scrollbar-thumb {
background: var(--scrollbar-thumb-fill-color) var(--vertical-scrollbar-thumb-background);
background: var(--vertical-scrollbar-thumb-background);
background-color: var(--scrollbar-thumb-fill-color);
background-size: var(--vertical-scrollbar-thumb-background-size);
}
.horizontal-scrollbar .scrollbar-thumb {
background: var(--scrollbar-thumb-fill-color) var(--horizontal-scrollbar-thumb-background);
background: var(--horizontal-scrollbar-thumb-background);
background-color: var(--scrollbar-thumb-fill-color);
background-size: var(--horizontal-scrollbar-thumb-background-size);
}
.scrollbar .scrollbar-thumb:hover,
Expand Down

0 comments on commit 755cb47

Please sign in to comment.