diff options
Diffstat (limited to '_sass/bourbon/css3')
25 files changed, 882 insertions, 0 deletions
diff --git a/_sass/bourbon/css3/_animation.scss b/_sass/bourbon/css3/_animation.scss new file mode 100644 index 0000000..aac675f --- /dev/null +++ b/_sass/bourbon/css3/_animation.scss @@ -0,0 +1,43 @@ +// http://www.w3.org/TR/css3-animations/#the-animation-name-property- +// Each of these mixins support comma separated lists of values, which allows different transitions for individual properties to be described in a single style rule. Each value in the list corresponds to the value at that same position in the other properties. + +@mixin animation($animations...) { + @include prefixer(animation, $animations, webkit moz spec); +} + +@mixin animation-name($names...) { + @include prefixer(animation-name, $names, webkit moz spec); +} + +@mixin animation-duration($times...) { + @include prefixer(animation-duration, $times, webkit moz spec); +} + +@mixin animation-timing-function($motions...) { + // ease | linear | ease-in | ease-out | ease-in-out + @include prefixer(animation-timing-function, $motions, webkit moz spec); +} + +@mixin animation-iteration-count($values...) { + // infinite | <number> + @include prefixer(animation-iteration-count, $values, webkit moz spec); +} + +@mixin animation-direction($directions...) { + // normal | alternate + @include prefixer(animation-direction, $directions, webkit moz spec); +} + +@mixin animation-play-state($states...) { + // running | paused + @include prefixer(animation-play-state, $states, webkit moz spec); +} + +@mixin animation-delay($times...) { + @include prefixer(animation-delay, $times, webkit moz spec); +} + +@mixin animation-fill-mode($modes...) { + // none | forwards | backwards | both + @include prefixer(animation-fill-mode, $modes, webkit moz spec); +} diff --git a/_sass/bourbon/css3/_appearance.scss b/_sass/bourbon/css3/_appearance.scss new file mode 100644 index 0000000..abddc02 --- /dev/null +++ b/_sass/bourbon/css3/_appearance.scss @@ -0,0 +1,3 @@ +@mixin appearance($value) { + @include prefixer(appearance, $value, webkit moz ms o spec); +} diff --git a/_sass/bourbon/css3/_backface-visibility.scss b/_sass/bourbon/css3/_backface-visibility.scss new file mode 100644 index 0000000..fc68e2d --- /dev/null +++ b/_sass/bourbon/css3/_backface-visibility.scss @@ -0,0 +1,3 @@ +@mixin backface-visibility($visibility) { + @include prefixer(backface-visibility, $visibility, webkit spec); +} diff --git a/_sass/bourbon/css3/_background-image.scss b/_sass/bourbon/css3/_background-image.scss new file mode 100644 index 0000000..d09f9b8 --- /dev/null +++ b/_sass/bourbon/css3/_background-image.scss @@ -0,0 +1,42 @@ +//************************************************************************// +// Background-image property for adding multiple background images with +// gradients, or for stringing multiple gradients together. +//************************************************************************// + +@mixin background-image($images...) { + $webkit-images: (); + $spec-images: (); + + @each $image in $images { + $webkit-image: (); + $spec-image: (); + + @if (type-of($image) == string) { + $url-str: str-slice($image, 0, 3); + $gradient-type: str-slice($image, 0, 6); + + @if $url-str == "url" { + $webkit-image: $image; + $spec-image: $image; + } + + @else if $gradient-type == "linear" { + $gradients: _linear-gradient-parser($image); + $webkit-image: map-get($gradients, webkit-image); + $spec-image: map-get($gradients, spec-image); + } + + @else if $gradient-type == "radial" { + $gradients: _radial-gradient-parser($image); + $webkit-image: map-get($gradients, webkit-image); + $spec-image: map-get($gradients, spec-image); + } + } + + $webkit-images: append($webkit-images, $webkit-image, comma); + $spec-images: append($spec-images, $spec-image, comma); + } + + background-image: $webkit-images; + background-image: $spec-images; +} diff --git a/_sass/bourbon/css3/_background.scss b/_sass/bourbon/css3/_background.scss new file mode 100644 index 0000000..efb4285 --- /dev/null +++ b/_sass/bourbon/css3/_background.scss @@ -0,0 +1,55 @@ +//************************************************************************// +// Background property for adding multiple backgrounds using shorthand +// notation. +//************************************************************************// + +@mixin background($backgrounds...) { + $webkit-backgrounds: (); + $spec-backgrounds: (); + + @each $background in $backgrounds { + $webkit-background: (); + $spec-background: (); + $background-type: type-of($background); + + @if $background-type == string or $background-type == list { + $background-str: if($background-type == list, nth($background, 1), $background); + + $url-str: str-slice($background-str, 0, 3); + $gradient-type: str-slice($background-str, 0, 6); + + @if $url-str == "url" { + $webkit-background: $background; + $spec-background: $background; + } + + @else if $gradient-type == "linear" { + $gradients: _linear-gradient-parser("#{$background}"); + $webkit-background: map-get($gradients, webkit-image); + $spec-background: map-get($gradients, spec-image); + } + + @else if $gradient-type == "radial" { + $gradients: _radial-gradient-parser("#{$background}"); + $webkit-background: map-get($gradients, webkit-image); + $spec-background: map-get($gradients, spec-image); + } + + @else { + $webkit-background: $background; + $spec-background: $background; + } + } + + @else { + $webkit-background: $background; + $spec-background: $background; + } + + $webkit-backgrounds: append($webkit-backgrounds, $webkit-background, comma); + $spec-backgrounds: append($spec-backgrounds, $spec-background, comma); + } + + background: $webkit-backgrounds; + background: $spec-backgrounds; +} diff --git a/_sass/bourbon/css3/_border-image.scss b/_sass/bourbon/css3/_border-image.scss new file mode 100644 index 0000000..e74efc0 --- /dev/null +++ b/_sass/bourbon/css3/_border-image.scss @@ -0,0 +1,59 @@ +@mixin border-image($borders...) { + $webkit-borders: (); + $spec-borders: (); + + @each $border in $borders { + $webkit-border: (); + $spec-border: (); + $border-type: type-of($border); + + @if $border-type == string or list { + $border-str: if($border-type == list, nth($border, 1), $border); + + $url-str: str-slice($border-str, 0, 3); + $gradient-type: str-slice($border-str, 0, 6); + + @if $url-str == "url" { + $webkit-border: $border; + $spec-border: $border; + } + + @else if $gradient-type == "linear" { + $gradients: _linear-gradient-parser("#{$border}"); + $webkit-border: map-get($gradients, webkit-image); + $spec-border: map-get($gradients, spec-image); + } + + @else if $gradient-type == "radial" { + $gradients: _radial-gradient-parser("#{$border}"); + $webkit-border: map-get($gradients, webkit-image); + $spec-border: map-get($gradients, spec-image); + } + + @else { + $webkit-border: $border; + $spec-border: $border; + } + } + + @else { + $webkit-border: $border; + $spec-border: $border; + } + + $webkit-borders: append($webkit-borders, $webkit-border, comma); + $spec-borders: append($spec-borders, $spec-border, comma); + } + + -webkit-border-image: $webkit-borders; + border-image: $spec-borders; + border-style: solid; +} + +//Examples: +// @include border-image(url("image.png")); +// @include border-image(url("image.png") 20 stretch); +// @include border-image(linear-gradient(45deg, orange, yellow)); +// @include border-image(linear-gradient(45deg, orange, yellow) stretch); +// @include border-image(linear-gradient(45deg, orange, yellow) 20 30 40 50 stretch round); +// @include border-image(radial-gradient(top, cover, orange, yellow, orange)); diff --git a/_sass/bourbon/css3/_calc.scss b/_sass/bourbon/css3/_calc.scss new file mode 100644 index 0000000..0bfc738 --- /dev/null +++ b/_sass/bourbon/css3/_calc.scss @@ -0,0 +1,4 @@ +@mixin calc($property, $value) { + #{$property}: -webkit-calc(#{$value}); + #{$property}: calc(#{$value}); +} diff --git a/_sass/bourbon/css3/_columns.scss b/_sass/bourbon/css3/_columns.scss new file mode 100644 index 0000000..9611767 --- /dev/null +++ b/_sass/bourbon/css3/_columns.scss @@ -0,0 +1,47 @@ +@mixin columns($arg: auto) { + // <column-count> || <column-width> + @include prefixer(columns, $arg, webkit moz spec); +} + +@mixin column-count($int: auto) { + // auto || integer + @include prefixer(column-count, $int, webkit moz spec); +} + +@mixin column-gap($length: normal) { + // normal || length + @include prefixer(column-gap, $length, webkit moz spec); +} + +@mixin column-fill($arg: auto) { + // auto || length + @include prefixer(column-fill, $arg, webkit moz spec); +} + +@mixin column-rule($arg) { + // <border-width> || <border-style> || <color> + @include prefixer(column-rule, $arg, webkit moz spec); +} + +@mixin column-rule-color($color) { + @include prefixer(column-rule-color, $color, webkit moz spec); +} + +@mixin column-rule-style($style: none) { + // none | hidden | dashed | dotted | double | groove | inset | inset | outset | ridge | solid + @include prefixer(column-rule-style, $style, webkit moz spec); +} + +@mixin column-rule-width ($width: none) { + @include prefixer(column-rule-width, $width, webkit moz spec); +} + +@mixin column-span($arg: none) { + // none || all + @include prefixer(column-span, $arg, webkit moz spec); +} + +@mixin column-width($length: auto) { + // auto || length + @include prefixer(column-width, $length, webkit moz spec); +} diff --git a/_sass/bourbon/css3/_filter.scss b/_sass/bourbon/css3/_filter.scss new file mode 100644 index 0000000..b8f8ffb --- /dev/null +++ b/_sass/bourbon/css3/_filter.scss @@ -0,0 +1,4 @@ +@mixin filter($function: none) { + // <filter-function> [<filter-function]* | none + @include prefixer(filter, $function, webkit spec); +} diff --git a/_sass/bourbon/css3/_flex-box.scss b/_sass/bourbon/css3/_flex-box.scss new file mode 100644 index 0000000..0c9b157 --- /dev/null +++ b/_sass/bourbon/css3/_flex-box.scss @@ -0,0 +1,287 @@ +// CSS3 Flexible Box Model and property defaults + +// Custom shorthand notation for flexbox +@mixin box($orient: inline-axis, $pack: start, $align: stretch) { + @include display-box; + @include box-orient($orient); + @include box-pack($pack); + @include box-align($align); +} + +@mixin display-box { + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; // IE 10 + display: box; +} + +@mixin box-orient($orient: inline-axis) { +// horizontal|vertical|inline-axis|block-axis|inherit + @include prefixer(box-orient, $orient, webkit moz spec); +} + +@mixin box-pack($pack: start) { +// start|end|center|justify + @include prefixer(box-pack, $pack, webkit moz spec); + -ms-flex-pack: $pack; // IE 10 +} + +@mixin box-align($align: stretch) { +// start|end|center|baseline|stretch + @include prefixer(box-align, $align, webkit moz spec); + -ms-flex-align: $align; // IE 10 +} + +@mixin box-direction($direction: normal) { +// normal|reverse|inherit + @include prefixer(box-direction, $direction, webkit moz spec); + -ms-flex-direction: $direction; // IE 10 +} + +@mixin box-lines($lines: single) { +// single|multiple + @include prefixer(box-lines, $lines, webkit moz spec); +} + +@mixin box-ordinal-group($int: 1) { + @include prefixer(box-ordinal-group, $int, webkit moz spec); + -ms-flex-order: $int; // IE 10 +} + +@mixin box-flex($value: 0) { + @include prefixer(box-flex, $value, webkit moz spec); + -ms-flex: $value; // IE 10 +} + +@mixin box-flex-group($int: 1) { + @include prefixer(box-flex-group, $int, webkit moz spec); +} + +// CSS3 Flexible Box Model and property defaults +// Unified attributes for 2009, 2011, and 2012 flavours. + +// 2009 - display (box | inline-box) +// 2011 - display (flexbox | inline-flexbox) +// 2012 - display (flex | inline-flex) +@mixin display($value) { +// flex | inline-flex + @if $value == "flex" { + // 2009 + display: -webkit-box; + display: -moz-box; + display: box; + + // 2012 + display: -webkit-flex; + display: -moz-flex; + display: -ms-flexbox; // 2011 (IE 10) + display: flex; + } @else if $value == "inline-flex" { + display: -webkit-inline-box; + display: -moz-inline-box; + display: inline-box; + + display: -webkit-inline-flex; + display: -moz-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + } @else { + display: $value; + } +} + +// 2009 - box-flex (integer) +// 2011 - flex (decimal | width decimal) +// 2012 - flex (integer integer width) +@mixin flex($value) { + + // Grab flex-grow for older browsers. + $flex-grow: nth($value, 1); + + // 2009 + @include prefixer(box-flex, $flex-grow, webkit moz spec); + + // 2011 (IE 10), 2012 + @include prefixer(flex, $value, webkit moz ms spec); +} + +// 2009 - box-orient ( horizontal | vertical | inline-axis | block-axis) +// - box-direction (normal | reverse) +// 2011 - flex-direction (row | row-reverse | column | column-reverse) +// 2012 - flex-direction (row | row-reverse | column | column-reverse) +@mixin flex-direction($value: row) { + + // Alt values. + $value-2009: $value; + $value-2011: $value; + $direction: normal; + + @if $value == row { + $value-2009: horizontal; + } @else if $value == "row-reverse" { + $value-2009: horizontal; + $direction: reverse; + } @else if $value == column { + $value-2009: vertical; + } @else if $value == "column-reverse" { + $value-2009: vertical; + $direction: reverse; + } + + // 2009 + @include prefixer(box-orient, $value-2009, webkit moz spec); + @include prefixer(box-direction, $direction, webkit moz spec); + + // 2012 + @include prefixer(flex-direction, $value, webkit moz spec); + + // 2011 (IE 10) + -ms-flex-direction: $value; +} + +// 2009 - box-lines (single | multiple) +// 2011 - flex-wrap (nowrap | wrap | wrap-reverse) +// 2012 - flex-wrap (nowrap | wrap | wrap-reverse) +@mixin flex-wrap($value: nowrap) { + // Alt values + $alt-value: $value; + @if $value == nowrap { + $alt-value: single; + } @else if $value == wrap { + $alt-value: multiple; + } @else if $value == "wrap-reverse" { + $alt-value: multiple; + } + + @include prefixer(box-lines, $alt-value, webkit moz spec); + @include prefixer(flex-wrap, $value, webkit moz ms spec); +} + +// 2009 - TODO: parse values into flex-direction/flex-wrap +// 2011 - TODO: parse values into flex-direction/flex-wrap +// 2012 - flex-flow (flex-direction || flex-wrap) +@mixin flex-flow($value) { + @include prefixer(flex-flow, $value, webkit moz spec); +} + +// 2009 - box-ordinal-group (integer) +// 2011 - flex-order (integer) +// 2012 - order (integer) +@mixin order($int: 0) { + // 2009 + @include prefixer(box-ordinal-group, $int, webkit moz spec); + + // 2012 + @include prefixer(order, $int, webkit moz spec); + + // 2011 (IE 10) + -ms-flex-order: $int; +} + +// 2012 - flex-grow (number) +@mixin flex-grow($number: 0) { + @include prefixer(flex-grow, $number, webkit moz spec); + -ms-flex-positive: $number; +} + +// 2012 - flex-shrink (number) +@mixin flex-shrink($number: 1) { + @include prefixer(flex-shrink, $number, webkit moz spec); + -ms-flex-negative: $number; +} + +// 2012 - flex-basis (number) +@mixin flex-basis($width: auto) { + @include prefixer(flex-basis, $width, webkit moz spec); + -ms-flex-preferred-size: $width; +} + +// 2009 - box-pack (start | end | center | justify) +// 2011 - flex-pack (start | end | center | justify) +// 2012 - justify-content (flex-start | flex-end | center | space-between | space-around) +@mixin justify-content($value: flex-start) { + + // Alt values. + $alt-value: $value; + @if $value == "flex-start" { + $alt-value: start; + } @else if $value == "flex-end" { + $alt-value: end; + } @else if $value == "space-between" { + $alt-value: justify; + } @else if $value == "space-around" { + $alt-value: distribute; + } + + // 2009 + @include prefixer(box-pack, $alt-value, webkit moz spec); + + // 2012 + @include prefixer(justify-content, $value, webkit moz ms o spec); + + // 2011 (IE 10) + -ms-flex-pack: $alt-value; +} + +// 2009 - box-align (start | end | center | baseline | stretch) +// 2011 - flex-align (start | end | center | baseline | stretch) +// 2012 - align-items (flex-start | flex-end | center | baseline | stretch) +@mixin align-items($value: stretch) { + + $alt-value: $value; + + @if $value == "flex-start" { + $alt-value: start; + } @else if $value == "flex-end" { + $alt-value: end; + } + + // 2009 + @include prefixer(box-align, $alt-value, webkit moz spec); + + // 2012 + @include prefixer(align-items, $value, webkit moz ms o spec); + + // 2011 (IE 10) + -ms-flex-align: $alt-value; +} + +// 2011 - flex-item-align (auto | start | end | center | baseline | stretch) +// 2012 - align-self (auto | flex-start | flex-end | center | baseline | stretch) +@mixin align-self($value: auto) { + + $value-2011: $value; + @if $value == "flex-start" { + $value-2011: start; + } @else if $value == "flex-end" { + $value-2011: end; + } + + // 2012 + @include prefixer(align-self, $value, webkit moz spec); + + // 2011 (IE 10) + -ms-flex-item-align: $value-2011; +} + +// 2011 - flex-line-pack (start | end | center | justify | distribute | stretch) +// 2012 - align-content (flex-start | flex-end | center | space-between | space-around | stretch) +@mixin align-content($value: stretch) { + + $value-2011: $value; + @if $value == "flex-start" { + $value-2011: start; + } @else if $value == "flex-end" { + $value-2011: end; + } @else if $value == "space-between" { + $value-2011: justify; + } @else if $value == "space-around" { + $value-2011: distribute; + } + + // 2012 + @include prefixer(align-content, $value, webkit moz spec); + + // 2011 (IE 10) + -ms-flex-line-pack: $value-2011; +} diff --git a/_sass/bourbon/css3/_font-face.scss b/_sass/bourbon/css3/_font-face.scss new file mode 100644 index 0000000..a9fd1ef --- /dev/null +++ b/_sass/bourbon/css3/_font-face.scss @@ -0,0 +1,24 @@ +@mixin font-face( + $font-family, + $file-path, + $weight: normal, + $style: normal, + $asset-pipeline: $asset-pipeline, + $file-formats: eot woff2 woff ttf svg) { + + $font-url-prefix: font-url-prefixer($asset-pipeline); + + @font-face { + font-family: $font-family; + font-style: $style; + font-weight: $weight; + + src: font-source-declaration( + $font-family, + $file-path, + $asset-pipeline, + $file-formats, + $font-url-prefix + ); + } +} diff --git a/_sass/bourbon/css3/_font-feature-settings.scss b/_sass/bourbon/css3/_font-feature-settings.scss new file mode 100644 index 0000000..9ac0452 --- /dev/null +++ b/_sass/bourbon/css3/_font-feature-settings.scss @@ -0,0 +1,4 @@ +@mixin font-feature-settings($settings...) { + @if length($settings) == 0 { $settings: none; } + @include prefixer(font-feature-settings, $settings, webkit moz ms spec); +} diff --git a/_sass/bourbon/css3/_hidpi-media-query.scss b/_sass/bourbon/css3/_hidpi-media-query.scss new file mode 100644 index 0000000..c2825ea --- /dev/null +++ b/_sass/bourbon/css3/_hidpi-media-query.scss @@ -0,0 +1,10 @@ +// HiDPI mixin. Default value set to 1.3 to target Google Nexus 7 (http://bjango.com/articles/min-device-pixel-ratio/) +@mixin hidpi($ratio: 1.3) { + @media only screen and (-webkit-min-device-pixel-ratio: $ratio), + only screen and (min--moz-device-pixel-ratio: $ratio), + only screen and (-o-min-device-pixel-ratio: #{$ratio}/1), + only screen and (min-resolution: round($ratio * 96dpi)), + only screen and (min-resolution: $ratio * 1dppx) { + @content; + } +} diff --git a/_sass/bourbon/css3/_hyphens.scss b/_sass/bourbon/css3/_hyphens.scss new file mode 100644 index 0000000..042f347 --- /dev/null +++ b/_sass/bourbon/css3/_hyphens.scss @@ -0,0 +1,4 @@ +@mixin hyphens($hyphenation: none) { + // none | manual | auto + @include prefixer(hyphens, $hyphenation, webkit moz ms spec); +} diff --git a/_sass/bourbon/css3/_image-rendering.scss b/_sass/bourbon/css3/_image-rendering.scss new file mode 100644 index 0000000..7e1a251 --- /dev/null +++ b/_sass/bourbon/css3/_image-rendering.scss @@ -0,0 +1,14 @@ +@mixin image-rendering ($mode:auto) { + + @if ($mode == crisp-edges) { + -ms-interpolation-mode: nearest-neighbor; // IE8+ + image-rendering: -moz-crisp-edges; + image-rendering: -o-crisp-edges; + image-rendering: -webkit-optimize-contrast; + image-rendering: crisp-edges; + } + + @else { + image-rendering: $mode; + } +} diff --git a/_sass/bourbon/css3/_keyframes.scss b/_sass/bourbon/css3/_keyframes.scss new file mode 100644 index 0000000..cc22558 --- /dev/null +++ b/_sass/bourbon/css3/_keyframes.scss @@ -0,0 +1,36 @@ +// Adds keyframes blocks for supported prefixes, removing redundant prefixes in the block's content +@mixin keyframes($name) { + $original-prefix-for-webkit: $prefix-for-webkit; + $original-prefix-for-mozilla: $prefix-for-mozilla; + $original-prefix-for-microsoft: $prefix-for-microsoft; + $original-prefix-for-opera: $prefix-for-opera; + $original-prefix-for-spec: $prefix-for-spec; + + @if $original-prefix-for-webkit { + @include disable-prefix-for-all(); + $prefix-for-webkit: true !global; + @-webkit-keyframes #{$name} { + @content; + } + } + + @if $original-prefix-for-mozilla { + @include disable-prefix-for-all(); + $prefix-for-mozilla: true !global; + @-moz-keyframes #{$name} { + @content; + } + } + + $prefix-for-webkit: $original-prefix-for-webkit !global; + $prefix-for-mozilla: $original-prefix-for-mozilla !global; + $prefix-for-microsoft: $original-prefix-for-microsoft !global; + $prefix-for-opera: $original-prefix-for-opera !global; + $prefix-for-spec: $original-prefix-for-spec !global; + + @if $original-prefix-for-spec { + @keyframes #{$name} { + @content; + } + } +} diff --git a/_sass/bourbon/css3/_linear-gradient.scss b/_sass/bourbon/css3/_linear-gradient.scss new file mode 100644 index 0000000..9e81633 --- /dev/null +++ b/_sass/bourbon/css3/_linear-gradient.scss @@ -0,0 +1,38 @@ +@mixin linear-gradient($pos, $g1, $g2: null, + $g3: null, $g4: null, + $g5: null, $g6: null, + $g7: null, $g8: null, + $g9: null, $g10: null, + $fallback: null) { + // Detect what type of value exists in $pos + $pos-type: type-of(nth($pos, 1)); + $pos-spec: null; + $pos-degree: null; + + // If $pos is missing from mixin, reassign vars and add default position + @if ($pos-type == color) or (nth($pos, 1) == "transparent") { + $g10: $g9; $g9: $g8; $g8: $g7; $g7: $g6; $g6: $g5; + $g5: $g4; $g4: $g3; $g3: $g2; $g2: $g1; $g1: $pos; + $pos: null; + } + + @if $pos { + $positions: _linear-positions-parser($pos); + $pos-degree: nth($positions, 1); + $pos-spec: nth($positions, 2); + } + + $full: $g1, $g2, $g3, $g4, $g5, $g6, $g7, $g8, $g9, $g10; + + // Set $g1 as the default fallback color + $fallback-color: nth($g1, 1); + + // If $fallback is a color use that color as the fallback color + @if (type-of($fallback) == color) or ($fallback == "transparent") { + $fallback-color: $fallback; + } + + background-color: $fallback-color; + background-image: -webkit-linear-gradient($pos-degree $full); // Safari 5.1+, Chrome + background-image: unquote("linear-gradient(#{$pos-spec}#{$full})"); +} diff --git a/_sass/bourbon/css3/_perspective.scss b/_sass/bourbon/css3/_perspective.scss new file mode 100644 index 0000000..0e4deb8 --- /dev/null +++ b/_sass/bourbon/css3/_perspective.scss @@ -0,0 +1,8 @@ +@mixin perspective($depth: none) { + // none | <length> + @include prefixer(perspective, $depth, webkit moz spec); +} + +@mixin perspective-origin($value: 50% 50%) { + @include prefixer(perspective-origin, $value, webkit moz spec); +} diff --git a/_sass/bourbon/css3/_placeholder.scss b/_sass/bourbon/css3/_placeholder.scss new file mode 100644 index 0000000..5682fd0 --- /dev/null +++ b/_sass/bourbon/css3/_placeholder.scss @@ -0,0 +1,8 @@ +@mixin placeholder { + $placeholders: ":-webkit-input" ":-moz" "-moz" "-ms-input"; + @each $placeholder in $placeholders { + &:#{$placeholder}-placeholder { + @content; + } + } +} diff --git a/_sass/bourbon/css3/_radial-gradient.scss b/_sass/bourbon/css3/_radial-gradient.scss new file mode 100644 index 0000000..8da076e --- /dev/null +++ b/_sass/bourbon/css3/_radial-gradient.scss @@ -0,0 +1,39 @@ +// Requires Sass 3.1+ +@mixin radial-gradient($g1, $g2, + $g3: null, $g4: null, + $g5: null, $g6: null, + $g7: null, $g8: null, + $g9: null, $g10: null, + $pos: null, + $shape-size: null, + $fallback: null) { + + $data: _radial-arg-parser($g1, $g2, $pos, $shape-size); + $g1: nth($data, 1); + $g2: nth($data, 2); + $pos: nth($data, 3); + $shape-size: nth($data, 4); + + $full: $g1, $g2, $g3, $g4, $g5, $g6, $g7, $g8, $g9, $g10; + + // Strip deprecated cover/contain for spec + $shape-size-spec: _shape-size-stripper($shape-size); + + // Set $g1 as the default fallback color + $first-color: nth($full, 1); + $fallback-color: nth($first-color, 1); + + @if (type-of($fallback) == color) or ($fallback == "transparent") { + $fallback-color: $fallback; + } + + // Add Commas and spaces + $shape-size: if($shape-size, "#{$shape-size}, ", null); + $pos: if($pos, "#{$pos}, ", null); + $pos-spec: if($pos, "at #{$pos}", null); + $shape-size-spec: if(($shape-size-spec != " ") and ($pos == null), "#{$shape-size-spec}, ", "#{$shape-size-spec} "); + + background-color: $fallback-color; + background-image: -webkit-radial-gradient(unquote(#{$pos}#{$shape-size}#{$full})); + background-image: unquote("radial-gradient(#{$shape-size-spec}#{$pos-spec}#{$full})"); +} diff --git a/_sass/bourbon/css3/_selection.scss b/_sass/bourbon/css3/_selection.scss new file mode 100644 index 0000000..cd71d4f --- /dev/null +++ b/_sass/bourbon/css3/_selection.scss @@ -0,0 +1,42 @@ +@charset "UTF-8";
+
+/// Outputs the spec and prefixed versions of the `::selection` pseudo-element.
+///
+/// @param {Bool} $current-selector [false]
+/// If set to `true`, it takes the current element into consideration.
+///
+/// @example scss - Usage
+/// .element {
+/// @include selection(true) {
+/// background-color: #ffbb52;
+/// }
+/// }
+///
+/// @example css - CSS Output
+/// .element::-moz-selection {
+/// background-color: #ffbb52;
+/// }
+///
+/// .element::selection {
+/// background-color: #ffbb52;
+/// }
+
+@mixin selection($current-selector: false) {
+ @if $current-selector {
+ &::-moz-selection {
+ @content;
+ }
+
+ &::selection {
+ @content;
+ }
+ } @else {
+ ::-moz-selection {
+ @content;
+ }
+
+ ::selection {
+ @content;
+ }
+ }
+}
diff --git a/_sass/bourbon/css3/_text-decoration.scss b/_sass/bourbon/css3/_text-decoration.scss new file mode 100644 index 0000000..9222746 --- /dev/null +++ b/_sass/bourbon/css3/_text-decoration.scss @@ -0,0 +1,19 @@ +@mixin text-decoration($value) { +// <text-decoration-line> || <text-decoration-style> || <text-decoration-color> + @include prefixer(text-decoration, $value, moz); +} + +@mixin text-decoration-line($line: none) { +// none || underline || overline || line-through + @include prefixer(text-decoration-line, $line, moz); +} + +@mixin text-decoration-style($style: solid) { +// solid || double || dotted || dashed || wavy + @include prefixer(text-decoration-style, $style, moz webkit); +} + +@mixin text-decoration-color($color: currentColor) { +// currentColor || <color> + @include prefixer(text-decoration-color, $color, moz); +} diff --git a/_sass/bourbon/css3/_transform.scss b/_sass/bourbon/css3/_transform.scss new file mode 100644 index 0000000..8ee6509 --- /dev/null +++ b/_sass/bourbon/css3/_transform.scss @@ -0,0 +1,15 @@ +@mixin transform($property: none) { + // none | <transform-function> + @include prefixer(transform, $property, webkit moz ms o spec); +} + +@mixin transform-origin($axes: 50%) { + // x-axis - left | center | right | length | % + // y-axis - top | center | bottom | length | % + // z-axis - length + @include prefixer(transform-origin, $axes, webkit moz ms o spec); +} + +@mixin transform-style($style: flat) { + @include prefixer(transform-style, $style, webkit moz ms o spec); +} diff --git a/_sass/bourbon/css3/_transition.scss b/_sass/bourbon/css3/_transition.scss new file mode 100644 index 0000000..3c785ed --- /dev/null +++ b/_sass/bourbon/css3/_transition.scss @@ -0,0 +1,71 @@ +// Shorthand mixin. Supports multiple parentheses-deliminated values for each variable. +// Example: @include transition (all 2s ease-in-out); +// @include transition (opacity 1s ease-in 2s, width 2s ease-out); +// @include transition-property (transform, opacity); + +@mixin transition($properties...) { + // Fix for vendor-prefix transform property + $needs-prefixes: false; + $webkit: (); + $moz: (); + $spec: (); + + // Create lists for vendor-prefixed transform + @each $list in $properties { + @if nth($list, 1) == "transform" { + $needs-prefixes: true; + $list1: -webkit-transform; + $list2: -moz-transform; + $list3: (); + + @each $var in $list { + $list3: join($list3, $var); + + @if $var != "transform" { + $list1: join($list1, $var); + $list2: join($list2, $var); + } + } + + $webkit: append($webkit, $list1); + $moz: append($moz, $list2); + $spec: append($spec, $list3); + } @else { + $webkit: append($webkit, $list, comma); + $moz: append($moz, $list, comma); + $spec: append($spec, $list, comma); + } + } + + @if $needs-prefixes { + -webkit-transition: $webkit; + -moz-transition: $moz; + transition: $spec; + } @else { + @if length($properties) >= 1 { + @include prefixer(transition, $properties, webkit moz spec); + } @else { + $properties: all 0.15s ease-out 0s; + @include prefixer(transition, $properties, webkit moz spec); + } + } +} + +@mixin transition-property($properties...) { + -webkit-transition-property: transition-property-names($properties, "webkit"); + -moz-transition-property: transition-property-names($properties, "moz"); + transition-property: transition-property-names($properties, false); +} + +@mixin transition-duration($times...) { + @include prefixer(transition-duration, $times, webkit moz spec); +} + +@mixin transition-timing-function($motions...) { + // ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier() + @include prefixer(transition-timing-function, $motions, webkit moz spec); +} + +@mixin transition-delay($times...) { + @include prefixer(transition-delay, $times, webkit moz spec); +} diff --git a/_sass/bourbon/css3/_user-select.scss b/_sass/bourbon/css3/_user-select.scss new file mode 100644 index 0000000..d4e5551 --- /dev/null +++ b/_sass/bourbon/css3/_user-select.scss @@ -0,0 +1,3 @@ +@mixin user-select($value: none) { + @include prefixer(user-select, $value, webkit moz ms spec); +} |