mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-24 06:43:50 -04:00
Fixed massive repaints when scrolling
This commit is contained in:
@@ -35,6 +35,9 @@
|
||||
// [screen +]: Add space for table of contents
|
||||
@include break-from-device(screen) {
|
||||
margin-left: 24.2rem;
|
||||
// Hack: setting overflow to auto is necessary in combination with floating
|
||||
// the inner container left, as this omits massive repaints
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
// Define spacing
|
||||
@@ -44,6 +47,13 @@
|
||||
// [screen +]: Increase spacing
|
||||
@include break-from-device(screen) {
|
||||
margin: 2.4rem;
|
||||
// Hack: necessary to omit massive repaints when scrolling
|
||||
float: left;
|
||||
|
||||
// Hack: remove bottom spacing, due to margin collapse
|
||||
:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
&[data-md-state="lock"] {
|
||||
position: fixed;
|
||||
top: 5.6rem;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
// [tablet -]: Convert navigation to drawer
|
||||
|
||||
Reference in New Issue
Block a user