Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
Added "inset-up, inset-down, inset-left, inset-right" four arguments …
Browse files Browse the repository at this point in the history
…to $direction

Please see http://codepen.io/P233/pen/AtzIw for more details.
  • Loading branch information
P233 committed Jan 12, 2014
1 parent 27b2db9 commit daf825d
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions app/assets/stylesheets/addons/_triangle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
$height: nth($size, length($size));

$foreground-color: nth($color, 1);
@if (length($color) == 1) {
$background-color: transparent;
} @else {
$background-color: transparent !default;
@if (length($color) == 2) {
$background-color: nth($color, 2);
}

Expand Down Expand Up @@ -59,4 +58,28 @@
border-right: $width solid $background-color;
}
}

@else if ($direction == inset-up) {
border-width: $height $width;
border-style: solid;
border-color: $background-color $background-color $foreground-color;
}

@else if ($direction == inset-down) {
border-width: $height $width;
border-style: solid;
border-color: $foreground-color $background-color $background-color;
}

@else if ($direction == inset-right) {
border-width: $width $height;
border-style: solid;
border-color: $background-color $background-color $background-color $foreground-color;
}

@else if ($direction == inset-left) {
border-width: $width $height;
border-style: solid;
border-color: $background-color $foreground-color $background-color $background-color;
}
}

0 comments on commit daf825d

Please sign in to comment.