From b381cc62aaaf503254e61474499df7572a2985ad Mon Sep 17 00:00:00 2001 From: Charles Zhao Date: Fri, 13 May 2022 22:01:10 +0800 Subject: [PATCH] refactor(console): refine scrollbar styles and positions --- .../src/components/AppContent/index.module.scss | 2 +- packages/console/src/scss/normalized.scss | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/console/src/components/AppContent/index.module.scss b/packages/console/src/components/AppContent/index.module.scss index 163a21ebe..bcff9ef50 100644 --- a/packages/console/src/components/AppContent/index.module.scss +++ b/packages/console/src/components/AppContent/index.module.scss @@ -10,12 +10,12 @@ .content { flex-grow: 1; display: flex; - padding-right: _.unit(6); margin-bottom: _.unit(6); overflow: hidden; .main { flex-grow: 1; + padding-right: _.unit(6); overflow-y: auto; } } diff --git a/packages/console/src/scss/normalized.scss b/packages/console/src/scss/normalized.scss index 20b60f660..77fd40cc0 100644 --- a/packages/console/src/scss/normalized.scss +++ b/packages/console/src/scss/normalized.scss @@ -55,3 +55,16 @@ table { } } } + +::-webkit-scrollbar { + width: 8px; +} + +::-webkit-scrollbar-thumb { + background: var(--color-neutral-variant-80); + border-radius: 4px; +} + +::-webkit-scrollbar-track { + background: transparent; +}