From bc41811e0ab6e304bd7901f21ff6a82138640ed0 Mon Sep 17 00:00:00 2001 From: Jared Stoffan Date: Tue, 15 Jun 2021 15:08:13 -0700 Subject: [PATCH] perf(presentation): Improve presentation rendering performance in Safari --- src/lib/viewers/doc/Presentation.scss | 4 ++++ src/lib/viewers/doc/_docBase.scss | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/viewers/doc/Presentation.scss b/src/lib/viewers/doc/Presentation.scss index 36ee771e8..c10e8ba06 100644 --- a/src/lib/viewers/doc/Presentation.scss +++ b/src/lib/viewers/doc/Presentation.scss @@ -12,6 +12,10 @@ bottom: 0; left: 0; margin: auto; + + &.bp-is-invisible { + opacity: 0; // Combine with visibility: hidden to improve large file performance in Safari + } } &.overflow-x { diff --git a/src/lib/viewers/doc/_docBase.scss b/src/lib/viewers/doc/_docBase.scss index 26a1b3a76..cc5ad5970 100644 --- a/src/lib/viewers/doc/_docBase.scss +++ b/src/lib/viewers/doc/_docBase.scss @@ -84,7 +84,6 @@ $thumbnail-sidebar-width: 191px; // Extra pixel to account for sidebar border background-color: $d-eight; border-radius: $thumbnail-border-radius; box-shadow: 0 0 0 1px $off-white, 0 1px 4px 0 rgba(0, 0, 0, .08); - transition: box-shadow 50ms ease; } .bp-thumbnail-page-number { @@ -101,7 +100,6 @@ $thumbnail-sidebar-width: 191px; // Extra pixel to account for sidebar border border-radius: $thumbnail-border-radius / 2 0 $thumbnail-border-radius 0; box-shadow: 1px 1px 2px 0 rgba(0, 0, 0, .2); opacity: 0; - transition: background 50ms ease, opacity 50ms ease; } .bp-thumbnail-image {