Created
January 21, 2015 20:45
-
-
Save Stanton/06e5327bde07dfa8f18c to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
<p class="foo">foo</p> | |
<p class="foo foo--bar">foo bar</p> |
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.9) | |
// Compass (v1.0.1) | |
// ---- | |
.foo { | |
// these won't be used as we're not inheriting them later | |
border-top-color: pink; | |
border-bottom-color: pink; | |
// these will be used through inheritance | |
border-left-color: red; | |
border-right-color: orange; | |
} | |
.foo--bar { | |
// set the border | |
&:before, | |
&:after { | |
border-width: 1px; | |
border-style: solid; | |
content: ' '; | |
display: inline-block; | |
height: 1em; | |
width: 10px; | |
} | |
/* check we can use :before/:after multiple times | |
* and use inherit to use the colours set in .foo | |
*/ | |
&:before { border-left-color: inherit; } | |
&:after { border-right-color: inherit; } | |
} |
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
.foo { | |
border-top-color: pink; | |
border-bottom-color: pink; | |
border-left-color: red; | |
border-right-color: orange; | |
} | |
.foo--bar { | |
/* check we can use :before/:after multiple times | |
* and use inherit to use the colours set in .foo | |
*/ | |
} | |
.foo--bar:before, .foo--bar:after { | |
border-width: 1px; | |
border-style: solid; | |
content: ' '; | |
display: inline-block; | |
height: 1em; | |
width: 10px; | |
} | |
.foo--bar:before { | |
border-left-color: inherit; | |
} | |
.foo--bar:after { | |
border-right-color: inherit; | |
} |
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
<p class="foo">foo</p> | |
<p class="foo foo--bar">foo bar</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment