Skip to content

Instantly share code, notes, and snippets.

@hideki-a
Created July 15, 2014 03:40
Show Gist options
  • Save hideki-a/b9f4b05bbcc43ed5a797 to your computer and use it in GitHub Desktop.
Save hideki-a/b9f4b05bbcc43ed5a797 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.0.rc.1)
// Compass (v1.0.0.alpha.20)
// ----
// Using "&" in SassScript
.list-products{
overflow: hidden;
margin-right: -30px;
li{
$selector: &;
debug: nth(nth($selector, 1),2);
position: relative;
display: inline-block;
margin: 0 30px 60px 0;
width: 335px;
vertical-align: top;
&:nth-child(2n+1):nth-last-child(-n+2),
&:nth-child(2n+1):nth-last-child(-n+2) ~ #{nth(nth($selector, 1),2)}{
margin-bottom: 0;
}
}
}
// Sass Functions
.nav{
@at-root #{selector-append(&, "-container")}{
margin-bottom: 30px;
border-width: 1px 0;
border-style: solid;
border-color: #ccc;
}
margin: 0 auto;
width: 960px;
}
.nav{
a{
.en{
color: #fff;
@at-root #{selector-replace(&, "a", "a:hover")}{
color: #fc0;
}
}
}
}
// @error
// https://github.com/sass/sass/blob/master/doc-src/SASS_REFERENCE.md#error
@mixin adjust-location($x, $y) {
@if unitless($x) {
@error "$x may not be unitless, was #{$x}.";
}
@if unitless($y) {
@error "$y may not be unitless, was #{$y}.";
}
position: relative; left: $x; top: $y;
}
.foo{
// @include adjust-location(100, 10px);
}
.list-products {
overflow: hidden;
margin-right: -30px;
}
.list-products li {
debug: li;
position: relative;
display: inline-block;
margin: 0 30px 60px 0;
width: 335px;
vertical-align: top;
}
.list-products li:nth-child(2n+1):nth-last-child(-n+2), .list-products li:nth-child(2n+1):nth-last-child(-n+2) ~ li {
margin-bottom: 0;
}
.nav {
margin: 0 auto;
width: 960px;
}
.nav-container {
margin-bottom: 30px;
border-width: 1px 0;
border-style: solid;
border-color: #ccc;
}
.nav a .en {
color: #fff;
}
.nav a:hover .en {
color: #fc0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment