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.
This commit is contained in:
Calixte Denizet 2023-02-08 11:48:48 +01:00
parent c8d9ad894b
commit bb89daa2a8

View File

@ -166,22 +166,22 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
background: url("images/loading-icon.gif") center no-repeat; background: url("images/loading-icon.gif") center no-repeat;
visibility: hidden; display: none;
/* Using a delay with background-image doesn't work, /* Using a delay with background-image doesn't work,
consequently we use the visibility. */ consequently we use the display. */
transition-property: visibility; transition-property: display;
transition-delay: var(--loading-icon-delay); transition-delay: var(--loading-icon-delay);
z-index: 5; z-index: 5;
contain: strict; contain: strict;
} }
.pdfViewer .page.loading:after { .pdfViewer .page.loading:after {
visibility: visible; display: block;
} }
.pdfViewer .page:not(.loading):after { .pdfViewer .page:not(.loading):after {
transition-property: none; transition-property: none;
visibility: hidden; display: none;
} }
.pdfViewer.enablePermissions .textLayer span { .pdfViewer.enablePermissions .textLayer span {