Last active
August 29, 2015 14:20
-
-
Save rcaracaus/dabfa562273831983619 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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
<div class="magic-blue-box">magic-blue-box</div> |
This file contains 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.13) | |
// Compass (v1.0.3) | |
// ---- | |
/* | |
Say you have two components in separate partials. | |
Magic Blue Box extends Block. | |
If _magic-blue-box.scss is included (say via Sass Globbing) | |
before _block.scss in styles.scss, you need to | |
use !important to manually give priority to | |
Magic Blue Box's overridding selectors. | |
The Compass Import Once gem solves this problem. | |
Not sure how to solve it in Libsass yet. | |
*/ | |
/* _magic-blue-box.scss */ | |
%magic-blue-box, | |
.magic-blue-box { | |
@extend %block; | |
color: blue !important; | |
} | |
/* _block.scss */ | |
%block, | |
.block { | |
width: 200px; | |
height: 200px; | |
padding: 1rem; | |
background: rgba(blue, .1); | |
color: transparent; | |
} |
This file contains 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
/* | |
Say you have two components in separate partials. | |
Magic Blue Box extends Block. | |
If _magic-blue-box.scss is included (say via Sass Globbing) | |
before _block.scss in styles.scss, you need to | |
use !important to manually give priority to | |
Magic Blue Box's overridding selectors. | |
The Compass Import Once gem solves this problem. | |
Not sure how to solve it in Libsass yet. | |
*/ | |
/* _magic-blue-box.scss */ | |
.magic-blue-box { | |
color: blue !important; | |
} | |
/* _block.scss */ | |
.magic-blue-box, | |
.block { | |
width: 200px; | |
height: 200px; | |
padding: 1rem; | |
background: rgba(0, 0, 255, 0.1); | |
color: transparent; | |
} |
This file contains 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
<div class="magic-blue-box">magic-blue-box</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment