Skip to content

Commit

Permalink
minor cleanups to base styles
Browse files Browse the repository at this point in the history
- only set 100% height on root element
- only apply scrollbar globally if browsers supports scrollbar-width
- formatting
  • Loading branch information
mojavelinux committed Dec 30, 2020
1 parent 731012b commit fab1ea2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
16 changes: 7 additions & 9 deletions src/css/base.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
html,
body {
height: 100%;
}

*,
*::before,
*::after {
Expand All @@ -12,6 +7,7 @@ body {
html {
box-sizing: border-box;
font-size: var(--body-font-size);
height: 100%;
}

@media screen and (min-width: 1024px) {
Expand Down Expand Up @@ -80,14 +76,16 @@ table {
word-wrap: normal; /* table widths aren't computed as expected when word-wrap is enabled */
}

body * {
scrollbar-width: thin;
scrollbar-color: var(--scrollbar-thumb-color) transparent;
@supports (scrollbar-width: thin) {
body * {
scrollbar-width: thin;
scrollbar-color: var(--scrollbar-thumb-color) transparent;
}
}

body ::-webkit-scrollbar {
width: 0.25rem;
height: 0.25rem;
width: 0.25rem;
}

body ::-webkit-scrollbar-thumb {
Expand Down
3 changes: 1 addition & 2 deletions src/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
@media screen and (min-width: 1024px) {
main {
flex: auto;
/* min-width: 0 required for flexbox to constrain overflowing elements */
min-width: 0;
min-width: 0; /* min-width: 0 required for flexbox to constrain overflowing elements */
}

main > .content {
Expand Down

0 comments on commit fab1ea2

Please sign in to comment.