From c30f105f9a4f87adcb701d64ada576e4a6f00df1 Mon Sep 17 00:00:00 2001 From: Novout Date: Thu, 23 Sep 2021 13:14:55 -0300 Subject: [PATCH] style: scrollbar --- src/preset.css | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/preset.css b/src/preset.css index 0d1ee924f..f7d487911 100644 --- a/src/preset.css +++ b/src/preset.css @@ -28,18 +28,30 @@ input:-webkit-autofill { -webkit-animation-fill-mode: both; } +:root { + --scr-track: #f1f1f1; + --scr-thumb: #888; + --scr-thumb-hover: #555; +} + +.dark { + --scr-track: #222; + --scr-thumb: #888; + --scr-thumb-hover: #555; +} + *::-webkit-scrollbar { width: 6px; } *::-webkit-scrollbar-track { - background: #f1f1f1; + background: var(--src-track); } *::-webkit-scrollbar-thumb { - background: #888; + background: var(--scr-thumb); } *::-webkit-scrollbar-thumb:hover { - background: #555; + background: var(--scr-thumb-hover); }