Skip to content

Commit

Permalink
Fixed scrollbar on mobile when header is hidden on some browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Sep 19, 2021
1 parent 60a0078 commit d678678
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 25 deletions.
2 changes: 2 additions & 0 deletions material/assets/stylesheets/main.3c7cdd75.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions material/assets/stylesheets/main.3c7cdd75.min.css.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions material/assets/stylesheets/main.665c42a3.min.css

This file was deleted.

1 change: 0 additions & 1 deletion material/assets/stylesheets/main.665c42a3.min.css.map

This file was deleted.

2 changes: 1 addition & 1 deletion material/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.665c42a3.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.3c7cdd75.min.css' | url }}">
{% if config.theme.palette %}
{% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.3f5d1f46.min.css' | url }}">
Expand Down
37 changes: 16 additions & 21 deletions src/assets/stylesheets/main/layout/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -146,41 +146,36 @@
@include break-to-device(tablet portrait) {
position: fixed;
top: 0;
left: 100%;
left: 0;
z-index: 2;
width: 100%;
height: 100%;
width: 0;
height: 0;
transform: translateX(5%);
opacity: 0;
transition:
right 0ms 300ms,
left 0ms 300ms,
width 0ms 300ms,
height 0ms 300ms,
transform 150ms 150ms cubic-bezier(0.4, 0, 0.2, 1),
opacity 150ms 150ms;

// Adjust for right-to-left languages
[dir="rtl"] & {
right: 0;
left: initial;
transform: translateX(-5%);
}

// Adjust appearance when search is active
[data-md-toggle="search"]:checked ~ .md-header & {
left: 0;
width: 100%;
height: 100%;
transform: translateX(0);
opacity: 1;
transition:
right 0ms 0ms,
left 0ms 0ms,
width 0ms 0ms,
height 0ms 0ms,
transform 150ms 150ms cubic-bezier(0.1, 0.7, 0.1, 1),
opacity 150ms 150ms;

// Adjust for right-to-left languages
[dir="rtl"] & {
right: 0;
left: initial;
}
}

// Adjust for right-to-left languages
html [dir="rtl"] & {
right: 100%;
left: initial;
transform: translateX(-5%);
}
}

Expand Down

0 comments on commit d678678

Please sign in to comment.