From 2b3ae50ed913e4a0aaa7041787d1d4b2a52583be Mon Sep 17 00:00:00 2001 From: Thomas Rittson Date: Fri, 21 May 2021 14:06:26 +1000 Subject: [PATCH] tidy up scss --- src/popup/scss/base.scss | 22 ++++++++++++++++++++-- src/popup/scss/misc.scss | 39 --------------------------------------- 2 files changed, 20 insertions(+), 41 deletions(-) diff --git a/src/popup/scss/base.scss b/src/popup/scss/base.scss index 54769ebdfa..8dd54509f1 100644 --- a/src/popup/scss/base.scss +++ b/src/popup/scss/base.scss @@ -100,7 +100,7 @@ main { height: 100%; } -content::-webkit-scrollbar { +content::-webkit-scrollbar, cdk-virtual-scroll-viewport::-webkit-scrollbar { width: 10px; height: 10px; } @@ -109,7 +109,13 @@ content::-webkit-scrollbar-track { background-color: transparent; } -content::-webkit-scrollbar-thumb { +cdk-virtual-scroll-viewport::-webkit-scrollbar-track { + @include themify($themes) { + background-color: themed('backgroundColor'); + } +} + +content::-webkit-scrollbar-thumb, cdk-virtual-scroll-viewport::-webkit-scrollbar-thumb { border-radius: 10px; margin-right: 1px; @@ -394,3 +400,15 @@ content { } } } + +// cdk-virtual-scroll +.cdk-virtual-scroll-viewport { + width: 100%; + height: 100%; + overflow-y: auto; + overflow-x: hidden; +} + +.cdk-virtual-scroll-content-wrapper { + width: 100%; +} diff --git a/src/popup/scss/misc.scss b/src/popup/scss/misc.scss index 05ec0c0d9f..1d12bba3c7 100644 --- a/src/popup/scss/misc.scss +++ b/src/popup/scss/misc.scss @@ -356,42 +356,3 @@ select option { background-color: darken(themed('inputBackgroundColor'), +1); } } - -// TODO: this but better -cdk-virtual-scroll-viewport { - height: 500px; - width: 375px; - overflow-y: auto !important; - overflow-x: hidden !important; -} - -// cribbed directly from base.scss -cdk-virtual-scroll-viewport::-webkit-scrollbar { - width: 10px; - height: 10px; -} - -cdk-virtual-scroll-viewport::-webkit-scrollbar-track { - @include themify($themes) { - background-color: themed('backgroundColor'); - } -} - -cdk-virtual-scroll-viewport::-webkit-scrollbar-thumb { - border-radius: 10px; - margin-right: 1px; - - @include themify($themes) { - background-color: themed('scrollbarColor'); - } - - &:hover { - @include themify($themes) { - background-color: themed('scrollbarHoverColor'); - } - } -} - -.cdk-virtual-scroll-content-wrapper { - width: 100%; -}