Merge pull request #113 from squidfunk/refactor/reduce-repaints-for-sidebar

Reduce repaints for sidebar
This commit is contained in:
Martin Donath 2017-01-15 15:04:08 +01:00 committed by GitHub
commit 9d24e6880b
5 changed files with 8 additions and 15 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -19,7 +19,7 @@
{% else %}
<link rel="shortcut icon" href="{{ base_url }}/assets/images/favicon.ico">
{% endif %}
<meta name="generator" content="mkdocs+mkdocs-material#1.0.1">
<meta name="generator" content="mkdocs+mkdocs-material#1.0.2">
{% endblock %}
{% block htmltitle %}
{% if page.title %}
@ -45,7 +45,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-1b8b9fdf68.css">
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-00f045df1c.css">
{% if config.extra.palette %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-02ce7adcc2.palette.css">
{% endif %}

View File

@ -265,14 +265,14 @@
// [tablet landscape +]: Header-embedded search
@include break-from-device(tablet landscape) {
@include z-depth(6);
top: 4rem;
transition: opacity 0.4s;
opacity: 0;
// Show search output in active state
[data-md-toggle="search"]:checked ~ .md-header & {
@include z-depth(6);
opacity: 1;
}
}

View File

@ -28,6 +28,7 @@
.md-sidebar {
position: relative;
width: 24.2rem;
padding: 2.4rem 0;
float: left;
overflow: visible;
@ -108,7 +109,8 @@
// Wrapper for scrolling on overflow
&__scrollwrap {
margin: 2.4rem 0.4rem;
max-height: 100%;
margin: 0 0.4rem;
overflow-y: auto;
// [tablet -]: Adjust margins
@ -120,15 +122,6 @@
}
}
// Limit height to window, if JavaScript is available
.js & {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
// Override native scrollbar styles
&::-webkit-scrollbar {
width: 0.4rem;