Skip to content

Commit e349186

Browse files
committed
feat(loading): Moved loading scss to its own file and added variables, closes #984
1 parent da565f1 commit e349186

File tree

4 files changed

+61
-41
lines changed

4 files changed

+61
-41
lines changed

scss/_loading.scss

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
/**
3+
* Loading
4+
* --------------------------------------------------
5+
*/
6+
7+
.loading-backdrop {
8+
@include transition(visibility 0s linear $loading-backdrop-fadein-duration);
9+
position: fixed;
10+
top: 0;
11+
left: 0;
12+
z-index: $z-index-loading-backdrop;
13+
14+
visibility: hidden;
15+
width: 100%;
16+
height: 100%;
17+
18+
&.active {
19+
@include transition-delay(0s);
20+
visibility: visible;
21+
22+
&.show-backdrop {
23+
background-color: $loading-backdrop-bg-color;
24+
}
25+
}
26+
}
27+
28+
.loading {
29+
position: fixed;
30+
top: 50%;
31+
left: 50%;
32+
padding: $loading-padding;
33+
34+
border-radius: $loading-border-radius;
35+
background-color: $loading-bg-color;
36+
37+
color: $loading-text-color;
38+
39+
text-align: center;
40+
text-overflow: ellipsis;
41+
font-size: $loading-font-size;
42+
43+
h1, h2, h3, h4, h5, h6 {
44+
color: $loading-text-color;
45+
}
46+
}

scss/_popup.scss

-40
Original file line numberDiff line numberDiff line change
@@ -105,43 +105,3 @@
105105

106106
background-color: rgba(0,0,0,0.4);
107107
}
108-
109-
.loading-backdrop {
110-
@include transition(visibility 0s linear 0.3s);
111-
position: fixed;
112-
top: 0;
113-
left: 0;
114-
z-index: $z-index-popup-backdrop;
115-
116-
visibility: hidden;
117-
width: 100%;
118-
height: 100%;
119-
120-
&.active {
121-
@include transition-delay(0s);
122-
visibility: visible;
123-
&.show-backdrop {
124-
background-color: rgba(0,0,0,0.7);
125-
}
126-
}
127-
}
128-
129-
.loading {
130-
position: fixed;
131-
top: 50%;
132-
left: 50%;
133-
padding: 20px;
134-
135-
border-radius: 5px;
136-
background-color: rgba(0,0,0,0.7);
137-
138-
color: #fff;
139-
140-
text-align: center;
141-
text-overflow: ellipsis;
142-
font-size: 15px;
143-
144-
h1, h2, h3, h4, h5, h6 {
145-
color: #fff;
146-
}
147-
}

scss/_variables.scss

+14-1
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,6 @@ $checkbox-on-bg-dark: $dark !default;
501501
$checkbox-off-border-default: $positive !default;
502502
$checkbox-on-bg-default: $positive !default;
503503

504-
505504
$checkbox-check-width: 3px !default;
506505
$checkbox-check-color: #fff !default;
507506

@@ -593,6 +592,19 @@ $popup-button-line-height: 20px !default;
593592
$popup-button-min-height: 45px !default;
594593

595594

595+
// Loading
596+
// -------------------------------
597+
598+
$loading-text-color: #fff !default;
599+
$loading-bg-color: rgba(0,0,0,0.7) !default;
600+
$loading-padding: 20px !default;
601+
$loading-border-radius: 5px !default;
602+
$loading-font-size: 15px !default;
603+
604+
$loading-backdrop-fadein-duration:0.3s !default;
605+
$loading-backdrop-bg-color: rgba(0,0,0,0.7) !default;
606+
607+
596608
// Badges
597609
// -------------------------------
598610

@@ -648,6 +660,7 @@ $z-index-item-options: 1 !default;
648660
$z-index-item-radio: 3 !default;
649661
$z-index-item-reordering: 9 !default;
650662
$z-index-item-toggle: 3 !default;
663+
$z-index-loading-backdrop: 11 !default;
651664
$z-index-menu: 0 !default;
652665
$z-index-modal: 10 !default;
653666
$z-index-pane: 1 !default;

scss/ionic.scss

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"menu",
2121
"modal",
2222
"popup",
23+
"loading",
2324
"items",
2425
"list",
2526
"badge",

0 commit comments

Comments
 (0)