Merge pull request #6548 from Panya/scroll-performance
Avoid full-screen repaints on scroll. Fixes #6520
This commit is contained in:
commit
ca4ff8abbc
|
@ -47,6 +47,7 @@
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="page docs docs-home">
|
<div class="page docs docs-home">
|
||||||
|
<div class="sidebar-background"></div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,15 @@
|
||||||
padding: @baseline 0;
|
padding: @baseline 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fixed-bg {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: -5; //keep it in the back
|
||||||
|
will-change: transform;
|
||||||
|
}
|
||||||
|
|
||||||
.inner-bg-large {
|
.inner-bg-large {
|
||||||
background-image: #c1b4d5; /* Old browsers */
|
background-image: #c1b4d5; /* Old browsers */
|
||||||
background-image: url(/images/sidebar_background_inner.png), -moz-linear-gradient(45deg, #c1b4d5 0%, #98d3f8 100%); /* FF3.6+ */
|
background-image: url(/images/sidebar_background_inner.png), -moz-linear-gradient(45deg, #c1b4d5 0%, #98d3f8 100%); /* FF3.6+ */
|
||||||
|
@ -74,7 +83,6 @@
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#c1b4d5', endColorstr='#98d3f8',GradientType=1 ); /* IE6-8 fallback on horizontal gradient */
|
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#c1b4d5', endColorstr='#98d3f8',GradientType=1 ); /* IE6-8 fallback on horizontal gradient */
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
background-attachment:fixed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.inner-bg-small {
|
.inner-bg-small {
|
||||||
|
@ -99,7 +107,6 @@
|
||||||
background-image: url(/images/sidebar_background_docs.png), linear-gradient(45deg, #362d6c 0%,#0c5593 100%); /* W3C */
|
background-image: url(/images/sidebar_background_docs.png), linear-gradient(45deg, #362d6c 0%,#0c5593 100%); /* W3C */
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#362d6c', endColorstr='#0c5593',GradientType=1 ); /* IE6-8 fallback on horizontal gradient */
|
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#362d6c', endColorstr='#0c5593',GradientType=1 ); /* IE6-8 fallback on horizontal gradient */
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-attachment:fixed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,7 @@
|
||||||
.page { //style all pages
|
.page { //style all pages
|
||||||
|
|
||||||
.page-background { //page background color
|
.page-background { //page background color
|
||||||
width: 100%;
|
.fixed-bg;
|
||||||
height: 100%;
|
|
||||||
top: 0;
|
|
||||||
position: fixed;
|
|
||||||
z-index: -5; //keep it in the back
|
|
||||||
} //.background
|
} //.background
|
||||||
|
|
||||||
.page-contents {
|
.page-contents {
|
||||||
|
@ -181,7 +177,9 @@
|
||||||
|
|
||||||
/* inner */
|
/* inner */
|
||||||
&.inner { //style inner pages
|
&.inner { //style inner pages
|
||||||
.inner-bg-large; //sidebar background
|
.sidebar-background { //sidebar background
|
||||||
|
.inner-bg-large;
|
||||||
|
}
|
||||||
|
|
||||||
.page-background { //change inner background color!
|
.page-background { //change inner background color!
|
||||||
background-color: @gray-background; //page background
|
background-color: @gray-background; //page background
|
||||||
|
@ -205,12 +203,14 @@
|
||||||
|
|
||||||
/* docs */
|
/* docs */
|
||||||
&.docs { //style all docs
|
&.docs { //style all docs
|
||||||
.docs-bg-large; //sidebar background
|
|
||||||
|
|
||||||
.page-background { //change the sidebar background color!
|
.page-background { //change the sidebar background color!
|
||||||
background: @white; //page background
|
background: @white; //page background
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sidebar-background { //sidebar background
|
||||||
|
.docs-bg-large;
|
||||||
|
}
|
||||||
|
|
||||||
.page-contents {
|
.page-contents {
|
||||||
padding-top: 30px;
|
padding-top: 30px;
|
||||||
background-color: @white;
|
background-color: @white;
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-background { //background image
|
||||||
|
.fixed-bg;
|
||||||
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
color: @dark-blue-text;
|
color: @dark-blue-text;
|
||||||
|
|
Loading…
Reference in New Issue