From ece4171ae40e0956c9d69e317fee1f96c427b113 Mon Sep 17 00:00:00 2001 From: Ryan P Kilby Date: Tue, 30 Jan 2018 03:08:06 -0500 Subject: [PATCH] Replace `background-attachment: fixed` in docs (#5777) Fixed backgrounds have performance issues on large displays. --- docs_theme/css/default.css | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs_theme/css/default.css b/docs_theme/css/default.css index a0a286b22..bb17a3a11 100644 --- a/docs_theme/css/default.css +++ b/docs_theme/css/default.css @@ -160,9 +160,19 @@ body, .navbar .navbar-inner .container-fluid{ margin: 0 auto; } -body{ - background: url("../img/grid.png") repeat-x; - background-attachment: fixed; +/* Replacement for `body { background-attachment: fixed; }`, which + has performance issues when scrolling on large displays. */ +body::before { + content: ' '; + position: fixed; + width: 100%; + height: 100%; + top: 0; + left: 0; + background-color: #f8f8f8; + background: url(../img/grid.png) repeat-x; + will-change: transform; + z-index: -1; }