-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
550669d
commit 032e8c6
Showing
2 changed files
with
97 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/** require bourbon */ | ||
/** ax5-ui-mixin : version 1.0 */ | ||
|
||
@mixin placeholder($color: $input-color-placeholder) { | ||
// Firefox | ||
&::-moz-placeholder { | ||
color: $color; | ||
opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526 | ||
} | ||
&:-ms-input-placeholder { color: $color; } // Internet Explorer 10+ | ||
&::-webkit-input-placeholder { color: $color; } // Safari and Chrome | ||
} | ||
|
||
@mixin prefixer($property, $value, $prefixes) { | ||
@each $prefix in $prefixes { | ||
@if $prefix == webkit { | ||
@if $prefix-for-webkit { | ||
-webkit-#{$property}: $value; | ||
} | ||
} @else if $prefix == moz { | ||
@if $prefix-for-mozilla { | ||
-moz-#{$property}: $value; | ||
} | ||
} @else if $prefix == ms { | ||
@if $prefix-for-microsoft { | ||
-ms-#{$property}: $value; | ||
} | ||
} @else if $prefix == o { | ||
@if $prefix-for-opera { | ||
-o-#{$property}: $value; | ||
} | ||
} @else if $prefix == spec { | ||
@if $prefix-for-spec { | ||
#{$property}: $value; | ||
} | ||
} @else { | ||
@warn "Unrecognized prefix: #{$prefix}"; | ||
} | ||
} | ||
} | ||
|
||
@mixin box-shadow ($shadows...) { | ||
@include prefixer(box-shadow, $shadows, spec); | ||
} | ||
|
||
@mixin background-size ($lengths...) { | ||
@include prefixer(background-size, $lengths, spec); | ||
} | ||
|
||
@mixin ax-border-radius($border-radius, $direction:"", $adjust:0){ | ||
@if (type_of($border-radius) == "list") { | ||
@if($direction == ""){ | ||
border-top-left-radius: nth($border-radius, 1)+$adjust; | ||
border-top-right-radius: nth($border-radius, 2)+$adjust; | ||
border-bottom-right-radius: nth($border-radius, 3)+$adjust; | ||
border-bottom-left-radius: nth($border-radius, 4)+$adjust; | ||
} | ||
@else if($direction == "top") { | ||
border-top-left-radius: nth($border-radius, 1)+$adjust; | ||
border-top-right-radius: nth($border-radius, 2)+$adjust; | ||
} | ||
@else if($direction == "bottom") { | ||
border-bottom-right-radius: nth($border-radius, 3)+$adjust; | ||
border-bottom-left-radius: nth($border-radius, 4)+$adjust; | ||
} | ||
@else if($direction == "left") { | ||
border-top-left-radius: nth($border-radius, 1)+$adjust; | ||
border-bottom-left-radius: nth($border-radius, 4)+$adjust; | ||
} | ||
@else if($direction == "right") { | ||
border-top-right-radius: nth($border-radius, 2)+$adjust; | ||
border-bottom-right-radius: nth($border-radius, 3)+$adjust; | ||
} | ||
} | ||
@else { | ||
@if($direction == "") { | ||
border-radius: $border-radius+$adjust; | ||
} | ||
@else if($direction == "top") { | ||
border-top-left-radius: $border-radius+$adjust; | ||
border-top-right-radius: $border-radius+$adjust; | ||
} | ||
@else if($direction == "bottom") { | ||
border-bottom-left-radius: $border-radius+$adjust; | ||
border-bottom-right-radius: $border-radius+$adjust; | ||
} | ||
@else if($direction == "left") { | ||
border-top-left-radius: $border-radius+$adjust; | ||
border-bottom-left-radius: $border-radius+$adjust; | ||
} | ||
@else if($direction == "right") { | ||
border-top-right-radius: $border-radius+$adjust; | ||
border-bottom-right-radius: $border-radius+$adjust; | ||
} | ||
} | ||
} |