Last active
January 1, 2016 20:34
-
-
Save danmartin/6a91847cf14d043db7d1 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
// ---- | |
// libsass (v3.3.2) | |
// ---- | |
// Set sides and all as a list of booleans | |
$border-radius-list: ( | |
all : (true, true, true, true), | |
top : (true true false false), | |
bottom : (false, false, true, true), | |
left : (true false false true), | |
right : (false, true, true, false), | |
); | |
@mixin border-radius ($side: all, $size: 5px) { | |
// Grab Boolean list of values based on given $side parameter | |
$bools: map-get($border-radius-list, $side); | |
$rad-list:(); // Set value list as empty variable to be appended in each loop below | |
@each $bool in $bools{ | |
// If value in loop is true append $rad-list with size parameter, else 0 | |
$rad-list: if($bool, append($rad-list,$size), append($rad-list,0px)); | |
} | |
// Once loop is complete append the rad-list value to the corresponding property declaration. | |
border-radius: $rad-list; | |
-moz-border-radius: $rad-list; | |
-webkit-border-radius: $rad-list; | |
} | |
#order-progress { | |
display:100%; | |
margin:0; | |
li{ | |
&:first-child { | |
@include border-radius(left); | |
} | |
&:last-child { | |
@include border-radius(right); | |
} | |
} | |
} |
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
#order-progress { | |
display: 100%; | |
margin: 0; | |
} | |
#order-progress li:first-child { | |
border-radius: 5px 0px 0px 5px; | |
-moz-border-radius: 5px 0px 0px 5px; | |
-webkit-border-radius: 5px 0px 0px 5px; | |
} | |
#order-progress li:last-child { | |
border-radius: 0px 5px 5px 0px; | |
-moz-border-radius: 0px 5px 5px 0px; | |
-webkit-border-radius: 0px 5px 5px 0px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment