From 6d8755d309527a84c76dd1dadcfe1fb10d943ed7 Mon Sep 17 00:00:00 2001 From: PCloud Date: Sun, 28 Apr 2024 12:26:57 +0100 Subject: [PATCH] chore: remove custom scroll bar Non-standard: This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. https://developer.mozilla.org/en-US/docs/Web/CSS/::-webkit-scrollbar The system default overlay scroll bar is actually better. --- assets/css/_core/_base.scss | 16 ---------------- assets/css/_page/_single.scss | 10 ---------- assets/css/_variables.scss | 11 ----------- 3 files changed, 37 deletions(-) diff --git a/assets/css/_core/_base.scss b/assets/css/_core/_base.scss index 0074ee09b..a72287406 100644 --- a/assets/css/_core/_base.scss +++ b/assets/css/_core/_base.scss @@ -15,22 +15,6 @@ html { } } -/* scrollbar, only support webkit */ -@if $custom-scrollbar { - ::-webkit-scrollbar { - width: .5rem; - height: .5rem; - } - - ::-webkit-scrollbar-thumb { - background-color: $custom-scrollbar-color; - - &:hover { - background-color: $custom-scrollbar-hover-color; - } - } -} - ::selection { background-color: $selection-color; } diff --git a/assets/css/_page/_single.scss b/assets/css/_page/_single.scss index c1a611ae3..0e4080280 100644 --- a/assets/css/_page/_single.scss +++ b/assets/css/_page/_single.scss @@ -153,16 +153,6 @@ .table-wrapper { overflow-x: auto; - @if $custom-scrollbar { - &::-webkit-scrollbar { - background-color: $table-background-color; - } - - ::-webkit-scrollbar-corner { - background-color: $table-background-color; - } - } - >table { width: 100%; max-width: 100%; diff --git a/assets/css/_variables.scss b/assets/css/_variables.scss index be9b13b5c..d265f04d4 100644 --- a/assets/css/_variables.scss +++ b/assets/css/_variables.scss @@ -28,17 +28,6 @@ $global-link-hover-color: var(--global-link-hover-color) !default; $global-border-color: var(--global-border-color) !default; // ========== Global ========== // -// ========== Scrollbar ========== // -// Whether enable custom scrollbar -$custom-scrollbar: true; -$custom-scrollbar-width: .5rem; -$custom-scrollbar-height: .5rem; -// Color of the scrollbar -$custom-scrollbar-color: #87878d !default; -// Color of the hover scrollbar -$custom-scrollbar-hover-color: #a9a9b3 !default; -// ========== Scrollbar ========== // - // ========== Selection ========== // // Color of the selected text $selection-color: var(--selection-color) !default;