Last active
March 3, 2017 17:00
-
-
Save akfzambrana/ae97dbbf4d48939e2af04b8eac07b0cd to your computer and use it in GitHub Desktop.
Example using mixin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
@mixin loader-base-config | |
color: red | |
position: fixed | |
box-sizing: border-box | |
left: -9999px | |
top: -9999px | |
width: 0 | |
height: 0 | |
overflow: hidden | |
z-index: 999999 | |
&:after, | |
&:before | |
box-sizing: border-box | |
display: none | |
&.is-active | |
background-color: blue | |
width: 100% | |
height: 100% | |
left: 0 | |
top: 0 | |
&:after, | |
&:before | |
display: block | |
.class-1 | |
@include loader-base-config | |
border: 1px solid red | |
.class-2 | |
@include loader-base-config | |
text-decoration: underline | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.class-1 { | |
color: red; | |
position: fixed; | |
box-sizing: border-box; | |
left: -9999px; | |
top: -9999px; | |
width: 0; | |
height: 0; | |
overflow: hidden; | |
z-index: 999999; | |
border: 1px solid red; | |
} | |
.class-1:after, .class-1:before { | |
box-sizing: border-box; | |
display: none; | |
} | |
.class-1.is-active { | |
background-color: blue; | |
width: 100%; | |
height: 100%; | |
left: 0; | |
top: 0; | |
} | |
.class-1.is-active:after, .class-1.is-active:before { | |
display: block; | |
} | |
.class-2 { | |
color: red; | |
position: fixed; | |
box-sizing: border-box; | |
left: -9999px; | |
top: -9999px; | |
width: 0; | |
height: 0; | |
overflow: hidden; | |
z-index: 999999; | |
text-decoration: underline; | |
} | |
.class-2:after, .class-2:before { | |
box-sizing: border-box; | |
display: none; | |
} | |
.class-2.is-active { | |
background-color: blue; | |
width: 100%; | |
height: 100%; | |
left: 0; | |
top: 0; | |
} | |
.class-2.is-active:after, .class-2.is-active:before { | |
display: block; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment