Skip to content

Instantly share code, notes, and snippets.

@magicspon
Created March 19, 2015 17:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magicspon/0d1277feb90c88d224a5 to your computer and use it in GitHub Desktop.
Save magicspon/0d1277feb90c88d224a5 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="test"></div>
// ----
// libsass (v3.1.0)
// ----
@function shadowGridBuilder($no,$x,$y,$color) {
$init: $x $y 0 0;
@for $i from 1 through 4 {
@if $i > 1 {
$init: $init + $color+ ', ' + ((($x * $i) + (($x * $i) - $x)) $y 0 0);
}
}
@return unquote($init + ' ' + $color);
}
.test {
width: 4px;
height: 4px;
box-shadow: shadowGridBuilder(4,4px,0,' #ff44dd'), shadowGridBuilder(4,4px,8px,' #ff44dd'), shadowGridBuilder(4,4px,16px,' #ff44dd'), shadowGridBuilder(4,4px,24px,' #ff44dd');
}
.test {
width: 4px;
height: 4px;
box-shadow: 4px 0 0 0 #ff44dd, 12px 0 0 0 #ff44dd, 20px 0 0 0 #ff44dd, 28px 0 0 0 #ff44dd, 4px 8px 0 0 #ff44dd, 12px 8px 0 0 #ff44dd, 20px 8px 0 0 #ff44dd, 28px 8px 0 0 #ff44dd, 4px 16px 0 0 #ff44dd, 12px 16px 0 0 #ff44dd, 20px 16px 0 0 #ff44dd, 28px 16px 0 0 #ff44dd, 4px 24px 0 0 #ff44dd, 12px 24px 0 0 #ff44dd, 20px 24px 0 0 #ff44dd, 28px 24px 0 0 #ff44dd; }
<div class="test"></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment