Skip to content

Commit ece4171

Browse files
Ryan P Kilbycarltongibson
authored andcommitted
Replace background-attachment: fixed in docs (#5777)
Fixed backgrounds have performance issues on large displays.
1 parent 769bc13 commit ece4171

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

docs_theme/css/default.css

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,19 @@ body, .navbar .navbar-inner .container-fluid{
160160
margin: 0 auto;
161161
}
162162

163-
body{
164-
background: url("../img/grid.png") repeat-x;
165-
background-attachment: fixed;
163+
/* Replacement for `body { background-attachment: fixed; }`, which
164+
has performance issues when scrolling on large displays. */
165+
body::before {
166+
content: ' ';
167+
position: fixed;
168+
width: 100%;
169+
height: 100%;
170+
top: 0;
171+
left: 0;
172+
background-color: #f8f8f8;
173+
background: url(../img/grid.png) repeat-x;
174+
will-change: transform;
175+
z-index: -1;
166176
}
167177

168178

0 commit comments

Comments
 (0)