feat: change horizontal scrollbar styles (#211)

* feat: change horizontal scrollbar styles

Change the horizontal scrollbar styles in Archives page following the
dark and light themes styles.  This horizontal scrollbar is at the top
of the Archives page. When I visit this page, the scrollbar stole my
attention. Unfortunately, it's the client (our browser) who decides its
styles;  this change is introduced to avoid that situation.

Co-authored-by: Miguel Angel <man98@me.com>

* remove scrollbar height and border-radius

In order to match the theme presentation
(https://i.imgur.com/cCiHOGS.jpg), the previous defined `height: 7px` and
`border-radius: 10px` for the scrollbar have been deleted.

* fix: set the horizontal scrollbar's height and width to `auto`

In Firefox the horizontal scrollbar looks very small. With a width set
to `auto`, it looks bigger and better. In Chromium, without an automatic
height, the new color changes do not appear.

Now the horizontal scrollbar looks consistent in both chromium and firefox.

* style: format list.scss

Co-authored-by: Miguel Angel <man98@me.com>
Co-authored-by: Jimmy Cai <github@jimmycai.com>
Co-authored-by: Jimmy Cai <jimmehcai@gmail.com>
This commit is contained in:
k 2021-06-12 04:32:54 -05:00 committed by GitHub
parent 2c0bf8c940
commit 58e8fadafe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View File

@ -52,6 +52,24 @@
margin-bottom: var(--section-separation); margin-bottom: var(--section-separation);
overflow-x: auto; overflow-x: auto;
/* scrollbar styles for Firefox */
scrollbar-width: auto;
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
/* scrollbar styles for Chromium */
&::-webkit-scrollbar {
height: auto;
}
&::-webkit-scrollbar-thumb {
background-color: var(--scrollbar-thumb);
}
&::-webkit-scrollbar-track {
background-color: var(--scrollbar-track);
}
/**/
.article-list--tile { .article-list--tile {
display: flex; display: flex;
padding-bottom: 15px; padding-bottom: 15px;

View File

@ -36,12 +36,17 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
--section-separation: 40px; --section-separation: 40px;
--scrollbar-thumb: hsl(0, 0%, 85%);
--scrollbar-track: var(--body-background);
[data-scheme="dark"] { [data-scheme="dark"] {
--body-background: #303030; --body-background: #303030;
--accent-color: #ecf0f1; --accent-color: #ecf0f1;
--accent-color-darker: #bdc3c7; --accent-color-darker: #bdc3c7;
--accent-color-text: #000; --accent-color-text: #000;
--body-text-color: rgba(255, 255, 255, 0.7); --body-text-color: rgba(255, 255, 255, 0.7);
--scrollbar-thumb: #424242;
--scrollbar-track: var(--body-background);
} }
} }