Skip to content

Commit

Permalink
feat(loading): Moved loading scss to its own file and added variables,
Browse files Browse the repository at this point in the history
…closes #984
  • Loading branch information
adamdbradley committed Mar 31, 2014
1 parent da565f1 commit e349186
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 41 deletions.
46 changes: 46 additions & 0 deletions scss/_loading.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

/**
* Loading
* --------------------------------------------------
*/

.loading-backdrop {
@include transition(visibility 0s linear $loading-backdrop-fadein-duration);
position: fixed;
top: 0;
left: 0;
z-index: $z-index-loading-backdrop;

visibility: hidden;
width: 100%;
height: 100%;

&.active {
@include transition-delay(0s);
visibility: visible;

&.show-backdrop {
background-color: $loading-backdrop-bg-color;
}
}
}

.loading {
position: fixed;
top: 50%;
left: 50%;
padding: $loading-padding;

border-radius: $loading-border-radius;
background-color: $loading-bg-color;

color: $loading-text-color;

text-align: center;
text-overflow: ellipsis;
font-size: $loading-font-size;

h1, h2, h3, h4, h5, h6 {
color: $loading-text-color;
}
}
40 changes: 0 additions & 40 deletions scss/_popup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,43 +105,3 @@

background-color: rgba(0,0,0,0.4);
}

.loading-backdrop {
@include transition(visibility 0s linear 0.3s);
position: fixed;
top: 0;
left: 0;
z-index: $z-index-popup-backdrop;

visibility: hidden;
width: 100%;
height: 100%;

&.active {
@include transition-delay(0s);
visibility: visible;
&.show-backdrop {
background-color: rgba(0,0,0,0.7);
}
}
}

.loading {
position: fixed;
top: 50%;
left: 50%;
padding: 20px;

border-radius: 5px;
background-color: rgba(0,0,0,0.7);

color: #fff;

text-align: center;
text-overflow: ellipsis;
font-size: 15px;

h1, h2, h3, h4, h5, h6 {
color: #fff;
}
}
15 changes: 14 additions & 1 deletion scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ $checkbox-on-bg-dark: $dark !default;
$checkbox-off-border-default: $positive !default;
$checkbox-on-bg-default: $positive !default;


$checkbox-check-width: 3px !default;
$checkbox-check-color: #fff !default;

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


// Loading
// -------------------------------

$loading-text-color: #fff !default;
$loading-bg-color: rgba(0,0,0,0.7) !default;
$loading-padding: 20px !default;
$loading-border-radius: 5px !default;
$loading-font-size: 15px !default;

$loading-backdrop-fadein-duration:0.3s !default;
$loading-backdrop-bg-color: rgba(0,0,0,0.7) !default;


// Badges
// -------------------------------

Expand Down Expand Up @@ -648,6 +660,7 @@ $z-index-item-options: 1 !default;
$z-index-item-radio: 3 !default;
$z-index-item-reordering: 9 !default;
$z-index-item-toggle: 3 !default;
$z-index-loading-backdrop: 11 !default;
$z-index-menu: 0 !default;
$z-index-modal: 10 !default;
$z-index-pane: 1 !default;
Expand Down
1 change: 1 addition & 0 deletions scss/ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"menu",
"modal",
"popup",
"loading",
"items",
"list",
"badge",
Expand Down

0 comments on commit e349186

Please sign in to comment.