Browse Source

Added elements and mixins for creating a 'cover' that hides the page until all elemets are ready.

dev
Bryan Miller 6 years ago
parent
commit
3dd8a85dfd
4 changed files with 49 additions and 8 deletions
  1. +22
    -0
      sass/core.scss
  2. +25
    -0
      sass/mixins.scss
  3. +1
    -8
      sass/modal.scss
  4. +1
    -0
      sass/style.scss

+ 22
- 0
sass/core.scss View File

flex-flow: row; flex-flow: row;
} }


// Used to hide the ENTIRE page until the system has finished readying
// everything.
.cover {
@include cover();
}


.coverFadeout {
-webkit-animation: coverFadeout 1s linear 1 forwards;
animation: coverFadeout 1s linear 1 forwards;
}

@-webkit-keyframes coverFadeout {
0% {@include opacity(1);}
100% {@include opacity(0);}
}


@keyframes coverFadeout {
0% {@include opacity(1);}
100% {@include opacity(0);}
}

+ 25
- 0
sass/mixins.scss View File


@mixin opacity($value){
-webkit-opacity: $value;
-moz-opacity: $value;
opacity: $value;
}

@mixin transition($properties){
-webkit-transition: $properties;
-moz-transition: $properties;
-ms-transition: $properties;
-o-transition: $properties;
transition: $properties;
}

@mixin cover(){
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: hidden;
background-color: rgb(0,0,0); /* Fallback color */
}

+ 1
- 8
sass/modal.scss View File

/* The Modal (background) */ /* The Modal (background) */
.modal { .modal {
display: none; /* Hidden by default */ display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: hidden;
background-color: rgb(0,0,0); /* Fallback color */
@include cover();
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
} }



+ 1
- 0
sass/style.scss View File



// Variables and Mixins // Variables and Mixins
@import 'variables'; @import 'variables';
@import 'mixins';


// NES Specific colors // NES Specific colors
@import 'nescolors'; @import 'nescolors';

Loading…
Cancel
Save