Changed sidebar position to absolute to fix repaints with buttons

This commit is contained in:
squidfunk 2017-03-03 17:57:20 +01:00 committed by Martin Donath
parent 25b366ce7f
commit 0fa899fe0b
7 changed files with 14 additions and 27 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

@ -32,7 +32,7 @@
<script src="{{ base_url }}/assets/javascripts/modernizr-56ade86843.js"></script> <script src="{{ base_url }}/assets/javascripts/modernizr-56ade86843.js"></script>
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-646a8e0c44.css"> <link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-2193a9b229.css">
{% if config.extra.palette %} {% if config.extra.palette %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-892b79c5c5.palette.css"> <link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-892b79c5c5.palette.css">
{% endif %} {% endif %}

View File

@ -27,7 +27,7 @@ site_url: http://squidfunk.github.io/mkdocs-material/
# Repository # Repository
repo_name: squidfunk/mkdocs-material repo_name: squidfunk/mkdocs-material
repo_url: https://github.com/squidfunk/mkdocs-material repo_url: https://github.com/squidfunk/mkdocs-material
#edit_uri: tree/master/docs edit_uri: tree/master/docs
# Copyright # Copyright
copyright: 'Copyright &copy; 2016 - 2017 Martin Donath' copyright: 'Copyright &copy; 2016 - 2017 Martin Donath'
@ -37,8 +37,8 @@ theme_dir: material
# Options # Options
extra: extra:
# feature: feature:
# tabs: true tabs: true
palette: palette:
primary: indigo primary: indigo
accent: indigo accent: indigo

View File

@ -23,10 +23,3 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Nothing to see here, move along // Nothing to see here, move along
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
html .md-sidebar--secondary {
// float: initial;
// //margin-left: 122rem;
// right: 0;
// position: absolute;
}

View File

@ -88,9 +88,9 @@
display: block; display: block;
position: absolute; position: absolute;
top: -0.4rem; top: -0.4rem;
right: -0.4rem; right: -0.5rem;
height: 4.8rem; height: 4.8rem;
border-right: 0.1rem solid $md-color-black--lighter; border-right: 0.2rem solid $md-color-black--lighter;
content: ""; content: "";
} }
} }

View File

@ -26,10 +26,9 @@
// Sidebar container // Sidebar container
.md-sidebar { .md-sidebar {
position: relative; position: absolute;
width: 24.2rem; width: 24.2rem;
padding: 2.4rem 0; padding: 2.4rem 0;
float: left;
overflow: hidden; overflow: hidden;
// Hide for print // Hide for print
@ -91,20 +90,15 @@
// [tablet landscape +]: Show table of contents next to body copy // [tablet landscape +]: Show table of contents next to body copy
@include break-from-device(tablet landscape) { @include break-from-device(tablet landscape) {
display: block; display: block;
float: right;
// Hack: align right in case of locked sidebar
&[data-md-state="lock"] {
margin-left: 100%; margin-left: 100%;
transform: translate(-100%, 0); transform: translate(-100%, 0);
}
// [screen +]: Limit to grid // [screen +]: Limit to grid
@include break-from-device(screen) { @include break-from-device(screen) {
margin-left: 122rem; margin-left: 122rem;
} }
} }
}
}
// Wrapper for scrolling on overflow // Wrapper for scrolling on overflow
&__scrollwrap { &__scrollwrap {