Skip to content

Commit 085088e

Browse files
committed
perf(infinitescroll): display none svg until needed
By default the SVG spinner should be display none at all times. Only display block the SVG when the infinite scroll is in the loading state. Closes #5776
1 parent 2000b1e commit 085088e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ionic/components/infinite-scroll/infinite-scroll.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ ion-infinite-scroll-content {
2222
flex-direction: column;
2323
justify-content: center;
2424
height: 100%;
25+
min-height: 84px;
2526
text-align: center;
2627
}
2728

2829
.infinite-loading {
30+
display: none;
2931
margin: $infinite-scroll-loading-margin;
3032
width: 100%;
31-
opacity: 0;
3233
}
3334

3435
.infinite-loading-text {
@@ -41,7 +42,7 @@ ion-infinite-scroll-content {
4142
// --------------------------------------------------
4243

4344
ion-infinite-scroll-content[state=loading] .infinite-loading {
44-
opacity: 1;
45+
display: block;
4546
}
4647

4748
ion-infinite-scroll-content[state=disabled] {

0 commit comments

Comments
 (0)