From fbd14090049621b41402dba2faaf1daec43db4ad Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Sun, 28 Dec 2014 00:31:47 +0000 Subject: [PATCH] Improved sidebar tab switching performance. Pretty much no lag now. Fixes #365. --- resources/report/css/overrides.css | 8 +++++--- resources/report/css/style.css | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/report/css/overrides.css b/resources/report/css/overrides.css index 17d1cea6..58ecf9c7 100644 --- a/resources/report/css/overrides.css +++ b/resources/report/css/overrides.css @@ -25,9 +25,11 @@ paper-icon-button[disabled] { bottom: 0; right: 0; } -/* This stops transitions from overflowing onto other elements. */ -html /deep/ core-animated-pages { - overflow: hidden; +/* This speeds up tab switching. The 1px height is so that core-list children + don't complain about not having a height set. */ +core-animated-pages::shadow ::content > *:not(.core-selected):not([animate]) { + display: block !important; + height: 1px; } /* This makes checkboxes have the same padding as icons in lists. */ html /deep/ core-menu paper-checkbox::shadow #checkboxLabel { diff --git a/resources/report/css/style.css b/resources/report/css/style.css index eca20888..16079bca 100644 --- a/resources/report/css/style.css +++ b/resources/report/css/style.css @@ -225,6 +225,7 @@ paper-item > a:hover { } #filters { padding: 8px 0; + overflow: hidden; } #filters > * { padding: 0 16px;