diff --git a/content/styles.css b/content/styles.css index e110905..2a7e917 100644 --- a/content/styles.css +++ b/content/styles.css @@ -8,6 +8,9 @@ --clr-code-bg: #1f1b1a; --clr-code-fg: #f0f3e6; + --clr-code-bg-dark: #181414; + + --scrollbar-height: 6px; /* TODO: Firefox */ } *, @@ -20,6 +23,8 @@ scrollbar-width: none; -ms-overflow-style: none; + scrollbar-color: var(--clr-code-bg-dark) transparent; + -webkit-box-sizing: border-box; box-sizing: border-box; @@ -32,12 +37,25 @@ scroll-behavior: smooth; } -::-webkit-scrollbar { +html::-webkit-scrollbar { display: none; } +::-webkit-scrollbar, +::-webkit-scrollbar-thumb { + height: var(--scrollbar-height); +} + +::-webkit-scrollbar { + background-color: transparent; +} + +::-webkit-scrollbar-thumb { + background-color: var(--clr-code-bg-dark); +} + /* - * Disabled because I want code blocks to scroll + * Removed because I want code blocks to scroll * code, code *, @@ -87,7 +105,7 @@ code { pre, pre code { - overflow-y: scroll !important; + overflow-x: auto !important; scrollbar-width: initial; -ms-overflow-style: initial; @@ -137,12 +155,25 @@ code:not(pre code) { --clr-code-bg: #181818; --clr-code-fg: whitesmoke; + + --scrollbar-height: 12px; /* TODO: Firefox */ + } + + html::-webkit-scrollbar { + display: initial !important; + } + + *, + *::before, + *::after { + scrollbar-width: initial !important; + -ms-overflow-style: initial !important; } a { - text-shadow: none; + text-shadow: none !important; - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; + -webkit-text-decoration: underline dotted !important; + text-decoration: underline dotted !important; } }