Skip to content

Commit

Permalink
New body scrollbar style option
Browse files Browse the repository at this point in the history
  • Loading branch information
PaperStrike committed Apr 14, 2021
1 parent 4ffaabb commit d83d869
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ mobile_layout_economy: false
# Android Chrome header panel color ($brand-bg / $headband-bg => $black-deep).
android_chrome_color: "#222"

# Place the scrollbar of <body> over the content.
overlay_body_scrollbar: false
# Available values: default | overlay | stable
body_scrollbar_style:

codeblock:
# Code Highlight theme
Expand Down
4 changes: 3 additions & 1 deletion source/css/_common/scaffolding/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ body {
position: relative;
transition: padding $transition-ease;

if (hexo-config('overlay_body_scrollbar')) {
if (hexo-config('overlay_body_scrollbar') == 'overlay') {
overflow-x: hidden;
@supports (overflow-x: clip) {
overflow-x: clip;
}
width: 100vw;
} else if (hexo-config('overlay_body_scrollbar') == 'stable') {
overflow-y: scroll;
}
}

Expand Down

0 comments on commit d83d869

Please sign in to comment.