Browse Source

fix: preserve the scroll bar width for the aesthetics of the windows system

linyan 2 years ago
parent
commit
144c04fbe7
2 changed files with 9 additions and 0 deletions
  1. 5 0
      src/styles/content.scss
  2. 4 0
      src/styles/index.scss

+ 5 - 0
src/styles/content.scss

@@ -112,6 +112,11 @@
 
 .light-scrollbar {
 
+    // light scrollbar
+    &::-webkit-scrollbar {
+        width: 8px;
+        height: 8px;
+    }
 
     &::-webkit-scrollbar-track {
         background: rgba(0, 0, 0, 0);

+ 4 - 0
src/styles/index.scss

@@ -20,6 +20,10 @@ body {
     margin: 0;
     background: var(--semi-color-bg-0);
 
+    &::-webkit-scrollbar {
+        width: 8px;
+        height: 8px;
+    }
 
     &::-webkit-scrollbar-track {
         background: rgba(0, 0, 0, 0);