Created
May 10, 2015 19:45
-
-
Save una/e979c98e4e9d0e816ac6 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
<ul class="icons"> | |
<li></li></li> | |
</ul> |
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) | |
// ---- | |
.item-summary { | |
background-color: white; | |
width: 100%; | |
display: block; | |
// when using an ampersand, no nesting occurs. The item is immediately | |
&:hover { | |
background-color: gray; | |
} | |
img { | |
width: 20%; | |
} | |
// this works really well for BEM syntax | |
// **(BEM MIXIN?) | |
&--showcased { | |
outline: 3px solid red; | |
img { | |
width: 50%; | |
} | |
} | |
// The trailing ampersand is useful for nested structures for the developer's purposes, but brings switches the order of the scope | |
// this will be for all .item-summary in the sidebar | |
sidebar & { | |
width: 100px; | |
float: left; | |
} | |
// The Double Ampersand will affect only items that follow an item of the same type (so you can do vertical spacing without the awkward first element having that style) | |
& + & { | |
margin-top: 2px; | |
} | |
.sidebar > & { | |
color: purple; | |
} | |
} |
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
.item-summary { | |
background-color: white; | |
width: 100%; | |
display: block; | |
} | |
.item-summary:hover { | |
background-color: gray; | |
} | |
.item-summary img { | |
width: 20%; | |
} | |
.item-summary--showcased { | |
outline: 3px solid red; | |
} | |
.item-summary--showcased img { | |
width: 50%; | |
} | |
sidebar .item-summary { | |
width: 100px; | |
float: left; | |
} | |
.item-summary + .item-summary { | |
margin-top: 2px; | |
} | |
.sidebar > .item-summary { | |
color: purple; | |
} |
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
<ul class="icons"> | |
<li></li></li> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment