Created
February 11, 2015 22:09
-
-
Save SasSam/42d696acaa4313ef90d9 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
<div class="container"> | |
<p>Hello world</p> | |
</div> |
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
// ---- | |
// libsass (v3.1.0-beta) | |
// ---- | |
@mixin icon-youtube { | |
width: 2rem; | |
height: 2rem; | |
background-position: 0 -109.6875rem; | |
color: #f00; | |
border: 1px solid #f00; | |
@include background(); | |
} | |
@mixin icon-wheel { | |
width: 0.875rem; | |
height: 0.875rem; | |
color: #0f0; | |
border: 1px solid #0f0; | |
background-position: -2.5rem -108.4375rem; | |
@include background(); | |
} | |
@mixin background() { | |
background-size: 118.4375rem 112.1875rem; | |
background-repeat: no-repeat; | |
background-image: url(sprite.png); | |
.svg & { | |
background-image: url(sprite.svg); | |
} | |
} | |
.container { | |
background: #ff0; | |
&:before { | |
@include icon-youtube(); | |
content: "O"; | |
display: inline-block; | |
overflow: none; | |
transition: all 0.2s ease-in-out; | |
@media (min-width: 1000px) { | |
@include icon-wheel(); | |
} | |
} | |
} |
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
.container { | |
background: #ff0; } | |
.container:before { | |
width: 2rem; | |
height: 2rem; | |
background-position: 0 -109.6875rem; | |
color: #f00; | |
border: 1px solid #f00; | |
background-size: 118.4375rem 112.1875rem; | |
background-repeat: no-repeat; | |
background-image: url(sprite.png); | |
content: "O"; | |
display: inline-block; | |
overflow: none; | |
transition: all 0.2s ease-in-out; } | |
.svg .container:before { | |
background-image: url(sprite.svg); } | |
@media (min-width: 1000px) { | |
.container:before { | |
width: 0.875rem; | |
height: 0.875rem; | |
color: #0f0; | |
border: 1px solid #0f0; | |
background-position: -2.5rem -108.4375rem; | |
background-size: 118.4375rem 112.1875rem; | |
background-repeat: no-repeat; | |
background-image: url(sprite.png); } | |
.svg .container:before { | |
background-image: url(sprite.svg); } } |
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
<div class="container"> | |
<p>Hello world</p> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment