Skip to content

Commit 8af62be

Browse files
authored
[Backport 1.8] COMPASS 1417 Remove loading animation scrollbars (#1195) (#1205)
* Temporarily disable hiding the loading animation So it's easier to inspect its state. * Remove default 8px margin * Use standard top/left pattern from .sq CSS class * Go back to width: 100% removing margin/padding No flexbox needed in this context. * Remove duplicate text-align * Abstract towards a reusable loading animation component CSS animation appears to be special enough I don't know how to handle it in this context, perhaps it needs another wrapper? * Revert "Temporarily disable hiding the loading animation"
1 parent 7a65f70 commit 8af62be

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

src/app/loading/loading.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
<link href="style.css" rel="stylesheet" type="text/css">
55
</head>
66
<body>
7-
<div class="sq sq1"></div>
8-
<div class="sq sq2"></div>
9-
<span>loading&hellip;</span>
7+
<div class="loading-animation">
8+
<div class="sq sq1"></div>
9+
<div class="sq sq2"></div>
10+
<span>loading&hellip;</span>
11+
</div>
1012
</body>
1113
</html>

src/app/loading/style.css

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,28 @@
99
}
1010

1111
html, body {
12-
height: 100%;
13-
width: 100%;
1412
font-family: "Akzidenz", "Helvetica Neue", Helvetica, Arial, sans-serif;
1513
color: #333;
1614
font-weight: bold;
1715
-webkit-font-smoothing: antialiased;
16+
margin: 0;
1817
position: relative;
1918
}
2019

20+
.loading-animation {
21+
align-items: center;
22+
display: flex;
23+
height: 100vh;
24+
justify-content: center;
25+
width: 100vw;
26+
}
27+
2128
.sq {
2229
background: #43B1E5;
2330
position: absolute;
24-
top: 50%;
25-
left: 50%;
2631
height: 12px;
2732
width: 12px;
33+
/* So animation does not overlap with loading text */
2834
margin-top: -36px;
2935
}
3036

@@ -58,14 +64,9 @@ html, body {
5864
}
5965

6066
span {
61-
position: absolute;
62-
top: 50%;
63-
width: 100%;
64-
padding-left: 6px;
6567
text-align: center;
6668
font-size: 11px;
6769
line-height: 1;
6870
text-transform: uppercase;
69-
text-align: center;
70-
-moz-osx-font-smoothing: grayscale;
71+
width: 100%;
7172
}

0 commit comments

Comments
 (0)