From bb89daa2a8f09095c4965199bc72ea0547ab9f0b Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Wed, 8 Feb 2023 11:48:48 +0100 Subject: [PATCH] Avoid a useless animation when the spinner is invisible In looking at a profile, I noticed in Marker chart that there's an animation for loading-icon.gif even if this icon isn't visible. This patch doesn't completely remove it but just slightly postpones it. --- web/pdf_viewer.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/pdf_viewer.css b/web/pdf_viewer.css index b31a42ec3..89b5e9b9e 100644 --- a/web/pdf_viewer.css +++ b/web/pdf_viewer.css @@ -166,22 +166,22 @@ width: 100%; height: 100%; background: url("images/loading-icon.gif") center no-repeat; - visibility: hidden; + display: none; /* Using a delay with background-image doesn't work, - consequently we use the visibility. */ - transition-property: visibility; + consequently we use the display. */ + transition-property: display; transition-delay: var(--loading-icon-delay); z-index: 5; contain: strict; } .pdfViewer .page.loading:after { - visibility: visible; + display: block; } .pdfViewer .page:not(.loading):after { transition-property: none; - visibility: hidden; + display: none; } .pdfViewer.enablePermissions .textLayer span {