diff --git a/src/app/globals.scss b/src/app/globals.scss index 4fd7f37..5f23abb 100644 --- a/src/app/globals.scss +++ b/src/app/globals.scss @@ -50,6 +50,123 @@ html { container-type: size; } + +:root { + --scrollbar-bg: #f4f3f7; + --scrollbar-thumb: #c1c1c1; + --scrollbar-thumb-hover: #a8a8a8; + --scrollbar-thumb-active: #787878; +} + +.dark { + --scrollbar-bg: hsl(276, 10%, 13%); + --scrollbar-thumb: hsl(276, 10%, 30%); + --scrollbar-thumb-hover: hsl(276, 10%, 35%); + --scrollbar-thumb-active: hsl(276, 10%, 40%); +} + +$scrollbar-size: 13px; + +::-webkit-scrollbar { + width: $scrollbar-size; + height: $scrollbar-size; +} + +::-webkit-scrollbar-corner, +::-webkit-scrollbar-track { + background-color: var(--scrollbar-bg); +} + +::-webkit-scrollbar-thumb { + background-color: var(--scrollbar-thumb); + background-clip: padding-box; + border: 3px solid transparent; + border-radius: 100px; +} + +::-webkit-scrollbar-thumb:hover { + background-color: var(--scrollbar-thumb-hover); +} + +::-webkit-scrollbar-thumb:active { + background-color: var(--scrollbar-thumb-active); +} + +/* Buttons */ +::-webkit-scrollbar-button:single-button { + background-color: var(--scrollbar-bg); + + display: block; + background-size: 8px; + background-repeat: no-repeat; +} + +/* Up */ +::-webkit-scrollbar-button:single-button:vertical:decrement { + height: $scrollbar-size; + width: $scrollbar-size; + background-position: center 4px; + background-image: url("data:image/svg+xml;utf8,"); +} + +::-webkit-scrollbar-button:single-button:vertical:decrement:hover { + background-image: url("data:image/svg+xml;utf8,"); +} + +::-webkit-scrollbar-button:single-button:vertical:decrement:active { + background-image: url("data:image/svg+xml;utf8,"); +} + +/* Down */ +::-webkit-scrollbar-button:single-button:vertical:increment { + height: $scrollbar-size; + width: $scrollbar-size; + background-position: center 2px; + background-image: url("data:image/svg+xml;utf8,"); +} + +::-webkit-scrollbar-button:single-button:vertical:increment:hover { + background-image: url("data:image/svg+xml;utf8,"); +} + +::-webkit-scrollbar-button:single-button:vertical:increment:active { + background-image: url("data:image/svg+xml;utf8,"); +} + +/* Left */ +::-webkit-scrollbar-button:single-button:horizontal:decrement { + height: 12px; + width: 12px; + background-position: 3px 3px; + background-image: url("data:image/svg+xml;utf8,"); + +} + +::-webkit-scrollbar-button:single-button:horizontal:decrement:hover { + background-image: url("data:image/svg+xml;utf8,"); +} + +::-webkit-scrollbar-button:single-button:horizontal:decrement:active { + background-image: url("data:image/svg+xml;utf8,"); +} + +/* Right */ +::-webkit-scrollbar-button:single-button:horizontal:increment { + height: 12px; + width: 12px; + background-position: 3px 3px; + background-image: url("data:image/svg+xml;utf8,"); +} + +::-webkit-scrollbar-button:single-button:horizontal:increment:hover { + background-image: url("data:image/svg+xml;utf8,"); +} + +::-webkit-scrollbar-button:single-button:horizontal:increment:active { + background-image: url("data:image/svg+xml;utf8,"); +} + + @layer base { :root { --background: 275 22% 96%;