Skip to content

Instantly share code, notes, and snippets.

@imathis
Forked from jlong/rounded.sass
Created July 19, 2009 22:02

Revisions

  1. imathis revised this gist Jul 20, 2009. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions rounded.sass
    Original file line number Diff line number Diff line change
    @@ -26,22 +26,22 @@
    =border-bottom-right-radius(!radius = !default_border_radius)
    +border-corner-radius("bottom", "right", !radius)

    // Round left corners by amount
    =border-left-radius(!radius = !default_border_radius)
    +border-top-left-radius(!radius)
    // Round top corners by amount
    =border-top-radius(!radius = !default_border_radius)
    +border-top-left-radius(!radius)
    +border-top-right-radius(!radius)

    // Round right corners by amount
    =border-right-radius(!radius = !default_border_radius)
    +border-top-right-radius(!radius)
    +border-bottom-right-radius(!radius)

    // Round top corners by amount
    =border-top-radius(!radius = !default_border_radius)
    +border-top-left-radius(!radius)
    +border-top-right-radius(!radius)

    // Round bottom corners by amount
    =border-bottom-radius(!radius = !default_border_radius)
    +border-bottom-left-radius(!radius)
    +border-bottom-right-radius(!radius)
    +border-bottom-right-radius(!radius)

    // Round left corners by amount
    =border-left-radius(!radius = !default_border_radius)
    +border-top-left-radius(!radius)
    +border-top-left-radius(!radius)
  2. imathis revised this gist Jul 20, 2009. 1 changed file with 17 additions and 17 deletions.
    34 changes: 17 additions & 17 deletions rounded.sass
    Original file line number Diff line number Diff line change
    @@ -1,47 +1,47 @@
    !default_boarder_radius ||= 5px
    !default_border_radius ||= 5px

    // Round all borders by amount
    =boarder-radius(!radius = !default_boarder_radius)
    =border-radius(!radius = !default_border_radius)
    border-radius= !radius
    -moz-border-radius= !radius
    -webkit-border-radius= !radius

    // Round radius at position by amount.
    // values for !vert: "top", "bottom"
    // values for !horz: "left", "right
    =border-corner-radius(!vert, !horz, !radius = !default_boarder_radius)
    =border-corner-radius(!vert, !horz, !radius = !default_border_radius)
    border-#{!vert}-#{!horz}-radius= !radius
    -moz-border-radius-#{!vert}#{!horz}= !radius
    -webkit-border-#{!vert}-#{!horz}-radius= !radius

    =border-top-left-radius(!radius = !default_boarder_radius)
    =border-top-left-radius(!radius = !default_border_radius)
    +border-corner-radius("top", "left", !radius)

    =boarder-top-right-radius(!radius = !default_boarder_radius)
    =border-top-right-radius(!radius = !default_border_radius)
    +border-corner-radius("top", "right", !radius)

    =boarder-bottom-left-radius(!radius = !default_boarder_radius)
    =border-bottom-left-radius(!radius = !default_border_radius)
    +border-corner-radius("bottom", "left", !radius)

    =boarder-bottom-right-radius(!radius = !default_boarder_radius)
    =border-bottom-right-radius(!radius = !default_border_radius)
    +border-corner-radius("bottom", "right", !radius)

    // Round left corners by amount
    =border-left-radius(!radius = !default_boarder_radius)
    +boarder-top-left-radius(!radius)
    +boarder-top-left-radius(!radius)
    =border-left-radius(!radius = !default_border_radius)
    +border-top-left-radius(!radius)
    +border-top-left-radius(!radius)

    // Round right corners by amount
    =border-right-radius(!radius = !default_boarder_radius)
    =border-right-radius(!radius = !default_border_radius)
    +border-top-right-radius(!radius)
    +border-bottom-right-radius(!radius)

    // Round top corners by amount
    =boarder-top-radius(!radius = !default_boarder_radius)
    +boarder-top-left-radius(!radius)
    +boarder-top-right-radius(!radius)
    =border-top-radius(!radius = !default_border_radius)
    +border-top-left-radius(!radius)
    +border-top-right-radius(!radius)

    // Round bottom corners by amount
    =boarder-bottom-radius(!radius = !default_boarder_radius)
    +boarder-bottom-left-radius(!radius)
    +boarder-bottom-right-radius(!radius)
    =border-bottom-radius(!radius = !default_border_radius)
    +border-bottom-left-radius(!radius)
    +border-bottom-right-radius(!radius)
  3. imathis revised this gist Jul 20, 2009. 1 changed file with 21 additions and 21 deletions.
    42 changes: 21 additions & 21 deletions rounded.sass
    Original file line number Diff line number Diff line change
    @@ -1,47 +1,47 @@
    !default_rounded_amount ||= 5px
    !default_boarder_radius ||= 5px

    // Round all corners by amount
    =round-corners(!radius = !default_rounded_amount)
    // Round all borders by amount
    =boarder-radius(!radius = !default_boarder_radius)
    border-radius= !radius
    -moz-border-radius= !radius
    -webkit-border-radius= !radius

    // Round corner at position by amount.
    // Round radius at position by amount.
    // values for !vert: "top", "bottom"
    // values for !horz: "left", "right
    =round-corner(!vert, !horz, !radius = !default_rounded_amount)
    =border-corner-radius(!vert, !horz, !radius = !default_boarder_radius)
    border-#{!vert}-#{!horz}-radius= !radius
    -moz-border-radius-#{!vert}#{!horz}= !radius
    -webkit-border-#{!vert}-#{!horz}-radius= !radius

    =round-top-left-corner(!radius = !default_rounded_amount)
    =border-top-left-radius(!radius = !default_boarder_radius)
    +border-corner-radius("top", "left", !radius)

    =round-top-right-corner(!radius = !default_rounded_amount)
    =boarder-top-right-radius(!radius = !default_boarder_radius)
    +border-corner-radius("top", "right", !radius)

    =round-bottom-left-corner(!radius = !default_rounded_amount)
    =boarder-bottom-left-radius(!radius = !default_boarder_radius)
    +border-corner-radius("bottom", "left", !radius)

    =round-bottom-right-corner(!radius = !default_rounded_amount)
    =boarder-bottom-right-radius(!radius = !default_boarder_radius)
    +border-corner-radius("bottom", "right", !radius)

    // Round left corners by amount
    =round-left-corners(!radius = !default_rounded_amount)
    +round-top-left-corner(!radius)
    +round-top-left-corner(!radius)
    =border-left-radius(!radius = !default_boarder_radius)
    +boarder-top-left-radius(!radius)
    +boarder-top-left-radius(!radius)

    // Round right corners by amount
    =round-right-corners(!radius = !default_rounded_amount)
    +round-top-right-corner(!radius)
    +round-bottom-right-corner(!radius)
    =border-right-radius(!radius = !default_boarder_radius)
    +border-top-right-radius(!radius)
    +border-bottom-right-radius(!radius)

    // Round top corners by amount
    =round-top-corners(!radius = !default_rounded_amount)
    +round-top-left-corner(!radius)
    +round-top-right-corner(!radius)
    =boarder-top-radius(!radius = !default_boarder_radius)
    +boarder-top-left-radius(!radius)
    +boarder-top-right-radius(!radius)

    // Round bottom corners by amount
    =round-bottom-corners(!radius = !default_rounded_amount)
    +round-bottom-left-corner(!radius)
    +round-bottom-right-corner(!radius)
    =boarder-bottom-radius(!radius = !default_boarder_radius)
    +boarder-bottom-left-radius(!radius)
    +boarder-bottom-right-radius(!radius)
  4. imathis revised this gist Jul 19, 2009. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions rounded.sass
    Original file line number Diff line number Diff line change
    @@ -32,16 +32,16 @@
    +round-top-left-corner(!radius)

    // Round right corners by amount
    =round-right-corners(!radius1 = !default_rounded_amount)
    =round-right-corners(!radius = !default_rounded_amount)
    +round-top-right-corner(!radius)
    +round-bottom-right-corner(!radius)

    // Round top corners by amount
    =round-top-corners(!radius1 = !default_rounded_amount)
    =round-top-corners(!radius = !default_rounded_amount)
    +round-top-left-corner(!radius)
    +round-top-right-corner(!radius)

    // Round bottom corners by amount
    =round-bottom-corners(!radius1 = !default_rounded_amount)
    =round-bottom-corners(!radius = !default_rounded_amount)
    +round-bottom-left-corner(!radius)
    +round-bottom-right-corner(!radius)
  5. imathis revised this gist Jul 19, 2009. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions rounded.sass
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,11 @@
    !default_rounded_amount ||= 5px

    // Round all corners by amount
    =round-corners(!radius = !default_rounded_amount)
    border-radius= !radius
    -moz-border-radius= !radius
    -webkit-border-radius= !radius

    // Round corner at position by amount.
    // values for !vert: "top", "bottom"
    // values for !horz: "left", "right
    @@ -37,11 +43,5 @@

    // Round bottom corners by amount
    =round-bottom-corners(!radius1 = !default_rounded_amount)
    round-bottom-left-corner(!radius)
    round-bottom-right-corner(!radius)

    // Round all corners by amount
    =round-corners(!radius = !default_rounded_amount)
    border-radius= !radius
    -moz-border-radius= !radius
    -webkit-border-radius= !radius
    +round-bottom-left-corner(!radius)
    +round-bottom-right-corner(!radius)
  6. imathis revised this gist Jul 19, 2009. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion rounded.sass
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,8 @@
    !default_rounded_amount ||= 5px

    // Round corner at position by amount.
    // values for position: "top-left", "top-right", "bottom-left", "bottom-right"
    // values for !vert: "top", "bottom"
    // values for !horz: "left", "right
    =round-corner(!vert, !horz, !radius = !default_rounded_amount)
    border-#{!vert}-#{!horz}-radius= !radius
    -moz-border-radius-#{!vert}#{!horz}= !radius
  7. imathis revised this gist Jul 19, 2009. 1 changed file with 32 additions and 20 deletions.
    52 changes: 32 additions & 20 deletions rounded.sass
    Original file line number Diff line number Diff line change
    @@ -2,33 +2,45 @@

    // Round corner at position by amount.
    // values for position: "top-left", "top-right", "bottom-left", "bottom-right"
    =round-corner(!position, !amount = !default_rounded_amount)
    border-#{!position}-radius= !amount
    -moz-border-#{!position}-radius= !amount
    -webkit-border-#{!position}-radius= !amount
    =round-corner(!vert, !horz, !radius = !default_rounded_amount)
    border-#{!vert}-#{!horz}-radius= !radius
    -moz-border-radius-#{!vert}#{!horz}= !radius
    -webkit-border-#{!vert}-#{!horz}-radius= !radius

    =round-top-left-corner(!radius = !default_rounded_amount)
    +border-corner-radius("top", "left", !radius)

    =round-top-right-corner(!radius = !default_rounded_amount)
    +border-corner-radius("top", "right", !radius)

    =round-bottom-left-corner(!radius = !default_rounded_amount)
    +border-corner-radius("bottom", "left", !radius)

    =round-bottom-right-corner(!radius = !default_rounded_amount)
    +border-corner-radius("bottom", "right", !radius)

    // Round left corners by amount
    =round-left-corners(!amount = !default_rounded_amount)
    +round-corner("top-left", !amount)
    +round-corner("bottom-left", !amount)
    =round-left-corners(!radius = !default_rounded_amount)
    +round-top-left-corner(!radius)
    +round-top-left-corner(!radius)

    // Round right corners by amount
    =round-right-corners(!amount = !default_rounded_amount)
    +round-corner("top-right", !amount)
    +round-corner("bottom-right", !amount)
    =round-right-corners(!radius1 = !default_rounded_amount)
    +round-top-right-corner(!radius)
    +round-bottom-right-corner(!radius)

    // Round top corners by amount
    =round-top-corners(!amount = !default_rounded_amount)
    +round-corner("top-left", !amount)
    +round-corner("top-right", !amount)
    =round-top-corners(!radius1 = !default_rounded_amount)
    +round-top-left-corner(!radius)
    +round-top-right-corner(!radius)

    // Round bottom corners by amount
    =round-bottom-corners(!amount = !default_rounded_amount)
    +round-corner("bottom-left", !amount)
    +round-corner("bottom-right", !amount)
    =round-bottom-corners(!radius1 = !default_rounded_amount)
    round-bottom-left-corner(!radius)
    round-bottom-right-corner(!radius)

    // Round all corners by amount
    =round-corners(!amount = !default_rounded_amount)
    border-radius: !amount
    -moz-border-radius= !amount
    -webkit-border-radius= !amount
    =round-corners(!radius = !default_rounded_amount)
    border-radius= !radius
    -moz-border-radius= !radius
    -webkit-border-radius= !radius
  8. @jlong jlong created this gist Jul 4, 2009.
    34 changes: 34 additions & 0 deletions rounded.sass
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    !default_rounded_amount ||= 5px

    // Round corner at position by amount.
    // values for position: "top-left", "top-right", "bottom-left", "bottom-right"
    =round-corner(!position, !amount = !default_rounded_amount)
    border-#{!position}-radius= !amount
    -moz-border-#{!position}-radius= !amount
    -webkit-border-#{!position}-radius= !amount

    // Round left corners by amount
    =round-left-corners(!amount = !default_rounded_amount)
    +round-corner("top-left", !amount)
    +round-corner("bottom-left", !amount)

    // Round right corners by amount
    =round-right-corners(!amount = !default_rounded_amount)
    +round-corner("top-right", !amount)
    +round-corner("bottom-right", !amount)

    // Round top corners by amount
    =round-top-corners(!amount = !default_rounded_amount)
    +round-corner("top-left", !amount)
    +round-corner("top-right", !amount)

    // Round bottom corners by amount
    =round-bottom-corners(!amount = !default_rounded_amount)
    +round-corner("bottom-left", !amount)
    +round-corner("bottom-right", !amount)

    // Round all corners by amount
    =round-corners(!amount = !default_rounded_amount)
    border-radius: !amount
    -moz-border-radius= !amount
    -webkit-border-radius= !amount