Skip to content

Commit

Permalink
perf(presentation): Improve presentation rendering performance in Saf…
Browse files Browse the repository at this point in the history
…ari (#1401)
  • Loading branch information
jstoffan authored Jun 16, 2021
1 parent 6be9662 commit 2ffb42e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/lib/viewers/doc/Presentation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions src/lib/viewers/doc/_docBase.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 2ffb42e

Please sign in to comment.