Skip to content
Browse files

Marged in size and triangle addons

  • Loading branch information...
2 parents 732dc15 + 467a3c5 commit 971fb2249edab3fe9ce4ab25b19de398edfe50ec Phil LaPier committed Dec 20, 2012
View
3 app/assets/stylesheets/_bourbon.scss 100644 → 100755
@@ -38,10 +38,13 @@
@import "addons/clearfix";
@import "addons/font-family";
@import "addons/hide-text";
+@import "addons/hidpi-media-query";
@import "addons/html5-input-types";
@import "addons/position";
@import "addons/prefixer";
+@import "addons/size";
@import "addons/timing-functions";
+@import "addons/triangle";
// Soon to be deprecated Mixins
@import "bourbon-deprecated-upcoming";
View
15 app/assets/stylesheets/addons/_size.scss
@@ -0,0 +1,15 @@
+@mixin size($width, $height) {
+
+ @if $width == auto {
+ width: $width;
+ }
+ @else if not(unitless($width)) {
+ width: $width;
+ }
+ @if $height == auto {
+ height: $height;
+ }
+ @else if not(unitless($height)) {
+ height: $height;
+ }
+}
View
34 app/assets/stylesheets/addons/_triangle.scss
@@ -0,0 +1,34 @@
+@mixin triangle ($width, $color, $direction) {
+ width: 0;
+ height: 0;
+
+ @if $direction == up {
+ border-width: $width / 2;
+ border-style: solid;
+ border-color: transparent transparent $color transparent;
+ } @else if $direction == right {
+ border-width: $width / 2;
+ border-style: solid;
+ border-color: transparent transparent transparent $color;
+ } @else if $direction == down {
+ border-width: $width / 2;
+ border-style: solid;
+ border-color: $color transparent transparent transparent;
+ } @else if $direction == left {
+ border-width: $width / 2;
+ border-style: solid;
+ border-color: transparent $color transparent transparent;
+ } @else if $direction == upright {
+ border-top: $width solid $color;
+ border-left: $width solid transparent ;
+ } @else if $direction == upleft {
+ border-top: $width solid $color;
+ border-right: $width solid transparent ;
+ } @else if $direction == downright {
+ border-bottom: $width solid $color;
+ border-left: $width solid transparent ;
+ } @else if $direction == downleft {
+ border-bottom: $width solid $color;
+ border-right: $width solid transparent ;
+ }
+}

0 comments on commit 971fb22

Please sign in to comment.
Something went wrong with that request. Please try again.