Skip to content

Instantly share code, notes, and snippets.

@bubbleheadinc
Created April 24, 2015 20:28
Show Gist options
  • Save bubbleheadinc/9bb243847003d166a268 to your computer and use it in GitHub Desktop.
Save bubbleheadinc/9bb243847003d166a268 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="gallery">one</div>
<div class="gallery">one</div><div class="gallery">one</div><div class="gallery">one</div><div class="gallery">one</div><div class="gallery">one</div><div class="gallery">one</div>
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// Susy (v2.2.2)
// ----
@import "susy";
$susy-no-gutters: (
columns: 12, // the number of columns in grid
column-width: 4em, // width of each column
gutters: 0.125, // the size of a gutter in relation to a single column
global-box-sizing: border-box, // tell Susy we are already using border box globally
container: 80em
);
@function f-map-deep-get($map, $keys...) {
$value: $map;
@each $key in $keys {
$value: map-get($value, $key);
}
@return $value;
}
$color-1: blue;
$color-2: darken($color-1, 30%);
@mixin x-rgba-ie-opacity($color, $alpha){
$rgba: rgba($color, $alpha);
$ie-hex-str: ie-hex-str($rgba);
background-color: transparent;
background-color: $rgba;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$ie-hex-str},endColorstr=#{$ie-hex-str});
zoom: 1;
}
%dosomething{
font-weight: bold;
}
@include with-layout(12 (0.25/4)){
.gallery{
background: green;
@include gallery(3 of 12);
}
}
.test-theme{
@extend %dosomething;
h2{
color: $color-1;
background-color: mix(white, $color-2, 20%);
background-color: tint($color-2, 20%);
}
&.is-awesome{
text-transform: uppercase;
}
}
.test-theme-link{
@extend %dosomething;
@include x-rgba-ie-opacity(#000, 0.5);
}
.test-theme, .test-theme-link {
font-weight: bold;
}
.gallery {
background: green;
width: 24.63054%;
float: left;
}
.gallery:nth-child(4n + 1) {
margin-left: 0;
margin-right: -100%;
clear: both;
margin-left: 0;
}
.gallery:nth-child(4n + 2) {
margin-left: 25.12315%;
margin-right: -100%;
clear: none;
}
.gallery:nth-child(4n + 3) {
margin-left: 50.24631%;
margin-right: -100%;
clear: none;
}
.gallery:nth-child(4n + 4) {
margin-left: 75.36946%;
margin-right: -100%;
clear: none;
}
.test-theme h2 {
color: blue;
background-color: #333384;
background-color: #333384;
}
.test-theme.is-awesome {
text-transform: uppercase;
}
.test-theme-link {
background-color: transparent;
background-color: rgba(0, 0, 0, 0.5);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#80000000,endColorstr=#80000000);
zoom: 1;
}
<div class="gallery">one</div>
<div class="gallery">one</div><div class="gallery">one</div><div class="gallery">one</div><div class="gallery">one</div><div class="gallery">one</div><div class="gallery">one</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment