Skip to content
This repository
Browse code

Marged in size and triangle addons

  • Loading branch information...
commit 971fb2249edab3fe9ce4ab25b19de398edfe50ec 2 parents 732dc15 + 467a3c5
Phil LaPier plapier authored
3  app/assets/stylesheets/_bourbon.scss 100644 → 100755
@@ -38,10 +38,13 @@
38 38 @import "addons/clearfix";
39 39 @import "addons/font-family";
40 40 @import "addons/hide-text";
  41 +@import "addons/hidpi-media-query";
41 42 @import "addons/html5-input-types";
42 43 @import "addons/position";
43 44 @import "addons/prefixer";
  45 +@import "addons/size";
44 46 @import "addons/timing-functions";
  47 +@import "addons/triangle";
45 48
46 49 // Soon to be deprecated Mixins
47 50 @import "bourbon-deprecated-upcoming";
15 app/assets/stylesheets/addons/_size.scss
... ... @@ -0,0 +1,15 @@
  1 +@mixin size($width, $height) {
  2 +
  3 + @if $width == auto {
  4 + width: $width;
  5 + }
  6 + @else if not(unitless($width)) {
  7 + width: $width;
  8 + }
  9 + @if $height == auto {
  10 + height: $height;
  11 + }
  12 + @else if not(unitless($height)) {
  13 + height: $height;
  14 + }
  15 +}
34 app/assets/stylesheets/addons/_triangle.scss
... ... @@ -0,0 +1,34 @@
  1 +@mixin triangle ($width, $color, $direction) {
  2 + width: 0;
  3 + height: 0;
  4 +
  5 + @if $direction == up {
  6 + border-width: $width / 2;
  7 + border-style: solid;
  8 + border-color: transparent transparent $color transparent;
  9 + } @else if $direction == right {
  10 + border-width: $width / 2;
  11 + border-style: solid;
  12 + border-color: transparent transparent transparent $color;
  13 + } @else if $direction == down {
  14 + border-width: $width / 2;
  15 + border-style: solid;
  16 + border-color: $color transparent transparent transparent;
  17 + } @else if $direction == left {
  18 + border-width: $width / 2;
  19 + border-style: solid;
  20 + border-color: transparent $color transparent transparent;
  21 + } @else if $direction == upright {
  22 + border-top: $width solid $color;
  23 + border-left: $width solid transparent ;
  24 + } @else if $direction == upleft {
  25 + border-top: $width solid $color;
  26 + border-right: $width solid transparent ;
  27 + } @else if $direction == downright {
  28 + border-bottom: $width solid $color;
  29 + border-left: $width solid transparent ;
  30 + } @else if $direction == downleft {
  31 + border-bottom: $width solid $color;
  32 + border-right: $width solid transparent ;
  33 + }
  34 +}

0 comments on commit 971fb22

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