Skip to content

Instantly share code, notes, and snippets.

@gergelypolonkai
Created April 27, 2015 20:19
Show Gist options
  • Select an option

  • Save gergelypolonkai/313b227434ecc5d85d7b to your computer and use it in GitHub Desktop.

Select an option

Save gergelypolonkai/313b227434ecc5d85d7b to your computer and use it in GitHub Desktop.
Cross-browser border radius mixin in SASS with variable parameters
=border-width($t, $r: $t, $b: $t, $l: $r)
border-top-width: $t
border-right-width: $r
border-bottom-width: $b
border-left-width: $l
=border-top-right-radius($value)
border-top-right-radius: $value
-moz-border-top-right-radius: $value
-webkit-border-top-right-radius: $value
=border-top-left-radius($value)
border-top-left-radius: $value
-moz-border-top-left-radius: $value
-webkit-border-top-left-radius: $value
=border-bottom-right-radius($value)
border-bottom-right-radius: $value
-moz-border-bottom-right-radius: $value
-webkit-border-bottom-right-radius: $value
=border-bottom-left-radius($value)
border-bottom-left-radius: $value
-moz-border-bottom-left-radius: $value
-webkit-border-bottom-left-radius: $value
=border-radius($tr, $br: $tr, $bl: $br, $tl: $tr)
+border-top-right-radius($tr)
+border-bottom-right-radius($br)
+border-bottom-left-radius($bl)
+border-top-left-radius($tl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment