bourbon 3.1.8 → 3.2.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/_bourbon.scss +12 -2
- data/app/assets/stylesheets/addons/_button.scss +3 -3
- data/app/assets/stylesheets/addons/_clearfix.scss +5 -11
- data/app/assets/stylesheets/addons/_directional-values.scss +114 -0
- data/app/assets/stylesheets/addons/_ellipsis.scss +7 -0
- data/app/assets/stylesheets/addons/_font-family.scss +1 -1
- data/app/assets/stylesheets/addons/_hide-text.scss +8 -3
- data/app/assets/stylesheets/addons/_html5-input-types.scss +57 -3
- data/app/assets/stylesheets/addons/_position.scss +6 -16
- data/app/assets/stylesheets/addons/_prefixer.scss +1 -5
- data/app/assets/stylesheets/addons/_rem.scss +33 -0
- data/app/assets/stylesheets/addons/_retina-image.scss +4 -5
- data/app/assets/stylesheets/css3/_background.scss +8 -8
- data/app/assets/stylesheets/css3/_border-image.scss +1 -0
- data/app/assets/stylesheets/css3/_calc.scss +4 -0
- data/app/assets/stylesheets/css3/_flex-box.scss +269 -0
- data/app/assets/stylesheets/css3/_hyphens.scss +4 -0
- data/app/assets/stylesheets/css3/_image-rendering.scss +3 -3
- data/app/assets/stylesheets/css3/_keyframes.scss +0 -7
- data/app/assets/stylesheets/css3/_linear-gradient.scss +7 -10
- data/app/assets/stylesheets/css3/_radial-gradient.scss +6 -11
- data/app/assets/stylesheets/css3/_transition.scss +4 -4
- data/app/assets/stylesheets/functions/_golden-ratio.scss +3 -0
- data/app/assets/stylesheets/functions/_modular-scale.scss +54 -28
- data/app/assets/stylesheets/functions/_px-to-em.scss +7 -2
- data/app/assets/stylesheets/functions/_radial-gradient.scss +7 -7
- data/app/assets/stylesheets/functions/_strip-units.scss +5 -0
- data/app/assets/stylesheets/functions/_unpack.scss +17 -0
- data/app/assets/stylesheets/helpers/_radial-arg-parser.scss +4 -4
- data/app/assets/stylesheets/settings/_prefixer.scss +6 -0
- data/app/assets/stylesheets/settings/_px-to-em.scss +1 -0
- data/bourbon.gemspec +2 -2
- data/bower.json +16 -0
- data/dist/_bourbon-deprecated-upcoming.scss +13 -0
- data/dist/_bourbon.scss +69 -0
- data/dist/addons/_button.scss +273 -0
- data/dist/addons/_clearfix.scss +23 -0
- data/dist/addons/_directional-values.scss +114 -0
- data/dist/addons/_ellipsis.scss +7 -0
- data/dist/addons/_font-family.scss +5 -0
- data/dist/addons/_hide-text.scss +10 -0
- data/dist/addons/_html5-input-types.scss +110 -0
- data/dist/addons/_position.scss +32 -0
- data/dist/addons/_prefixer.scss +45 -0
- data/dist/addons/_rem.scss +33 -0
- data/dist/addons/_retina-image.scss +31 -0
- data/dist/addons/_size.scss +44 -0
- data/dist/addons/_timing-functions.scss +32 -0
- data/dist/addons/_triangle.scss +45 -0
- data/dist/css3/_animation.scss +52 -0
- data/dist/css3/_appearance.scss +3 -0
- data/dist/css3/_backface-visibility.scss +6 -0
- data/dist/css3/_background-image.scss +48 -0
- data/dist/css3/_background.scss +103 -0
- data/dist/css3/_border-image.scss +56 -0
- data/dist/css3/_border-radius.scss +22 -0
- data/dist/css3/_box-sizing.scss +4 -0
- data/dist/css3/_calc.scss +4 -0
- data/dist/css3/_columns.scss +47 -0
- data/dist/css3/_flex-box.scss +321 -0
- data/dist/css3/_font-face.scss +23 -0
- data/dist/css3/_hidpi-media-query.scss +10 -0
- data/dist/css3/_hyphens.scss +4 -0
- data/dist/css3/_image-rendering.scss +13 -0
- data/dist/css3/_inline-block.scss +8 -0
- data/dist/css3/_keyframes.scss +36 -0
- data/dist/css3/_linear-gradient.scss +38 -0
- data/dist/css3/_perspective.scss +8 -0
- data/dist/css3/_placeholder.scss +29 -0
- data/dist/css3/_radial-gradient.scss +39 -0
- data/dist/css3/_transform.scss +15 -0
- data/dist/css3/_transition.scss +34 -0
- data/dist/css3/_user-select.scss +3 -0
- data/dist/functions/_flex-grid.scss +39 -0
- data/dist/functions/_golden-ratio.scss +3 -0
- data/dist/functions/_grid-width.scss +13 -0
- data/dist/functions/_linear-gradient.scss +13 -0
- data/dist/functions/_modular-scale.scss +66 -0
- data/dist/functions/_px-to-em.scss +13 -0
- data/dist/functions/_radial-gradient.scss +23 -0
- data/dist/functions/_strip-units.scss +5 -0
- data/dist/functions/_tint-shade.scss +9 -0
- data/dist/functions/_transition-property-name.scss +22 -0
- data/dist/functions/_unpack.scss +17 -0
- data/dist/helpers/_gradient-positions-parser.scss +13 -0
- data/dist/helpers/_linear-positions-parser.scss +61 -0
- data/dist/helpers/_radial-arg-parser.scss +69 -0
- data/dist/helpers/_radial-positions-parser.scss +18 -0
- data/dist/helpers/_render-gradients.scss +26 -0
- data/dist/helpers/_shape-size-stripper.scss +10 -0
- data/dist/settings/_prefixer.scss +6 -0
- data/dist/settings/_px-to-em.scss +1 -0
- data/lib/bourbon/version.rb +1 -1
- data/readme.md +2 -0
- metadata +77 -9
- data/app/assets/stylesheets/functions/_compact.scss +0 -11
- data/app/assets/stylesheets/helpers/_deprecated-webkit-gradient.scss +0 -39
@@ -0,0 +1,32 @@
|
|
1
|
+
// CSS cubic-bezier timing functions. Timing functions courtesy of jquery.easie (github.com/jaukia/easie)
|
2
|
+
// Timing functions are the same as demo'ed here: http://jqueryui.com/demos/effect/easing.html
|
3
|
+
|
4
|
+
// EASE IN
|
5
|
+
$ease-in-quad: cubic-bezier(0.550, 0.085, 0.680, 0.530);
|
6
|
+
$ease-in-cubic: cubic-bezier(0.550, 0.055, 0.675, 0.190);
|
7
|
+
$ease-in-quart: cubic-bezier(0.895, 0.030, 0.685, 0.220);
|
8
|
+
$ease-in-quint: cubic-bezier(0.755, 0.050, 0.855, 0.060);
|
9
|
+
$ease-in-sine: cubic-bezier(0.470, 0.000, 0.745, 0.715);
|
10
|
+
$ease-in-expo: cubic-bezier(0.950, 0.050, 0.795, 0.035);
|
11
|
+
$ease-in-circ: cubic-bezier(0.600, 0.040, 0.980, 0.335);
|
12
|
+
$ease-in-back: cubic-bezier(0.600, -0.280, 0.735, 0.045);
|
13
|
+
|
14
|
+
// EASE OUT
|
15
|
+
$ease-out-quad: cubic-bezier(0.250, 0.460, 0.450, 0.940);
|
16
|
+
$ease-out-cubic: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
17
|
+
$ease-out-quart: cubic-bezier(0.165, 0.840, 0.440, 1.000);
|
18
|
+
$ease-out-quint: cubic-bezier(0.230, 1.000, 0.320, 1.000);
|
19
|
+
$ease-out-sine: cubic-bezier(0.390, 0.575, 0.565, 1.000);
|
20
|
+
$ease-out-expo: cubic-bezier(0.190, 1.000, 0.220, 1.000);
|
21
|
+
$ease-out-circ: cubic-bezier(0.075, 0.820, 0.165, 1.000);
|
22
|
+
$ease-out-back: cubic-bezier(0.175, 0.885, 0.320, 1.275);
|
23
|
+
|
24
|
+
// EASE IN OUT
|
25
|
+
$ease-in-out-quad: cubic-bezier(0.455, 0.030, 0.515, 0.955);
|
26
|
+
$ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
27
|
+
$ease-in-out-quart: cubic-bezier(0.770, 0.000, 0.175, 1.000);
|
28
|
+
$ease-in-out-quint: cubic-bezier(0.860, 0.000, 0.070, 1.000);
|
29
|
+
$ease-in-out-sine: cubic-bezier(0.445, 0.050, 0.550, 0.950);
|
30
|
+
$ease-in-out-expo: cubic-bezier(1.000, 0.000, 0.000, 1.000);
|
31
|
+
$ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.150, 0.860);
|
32
|
+
$ease-in-out-back: cubic-bezier(0.680, -0.550, 0.265, 1.550);
|
@@ -0,0 +1,45 @@
|
|
1
|
+
@mixin triangle ($size, $color, $direction) {
|
2
|
+
height: 0;
|
3
|
+
width: 0;
|
4
|
+
|
5
|
+
@if ($direction == up) or ($direction == down) or ($direction == right) or ($direction == left) {
|
6
|
+
border-color: transparent;
|
7
|
+
border-style: solid;
|
8
|
+
border-width: $size / 2;
|
9
|
+
|
10
|
+
@if $direction == up {
|
11
|
+
border-bottom-color: $color;
|
12
|
+
|
13
|
+
} @else if $direction == right {
|
14
|
+
border-left-color: $color;
|
15
|
+
|
16
|
+
} @else if $direction == down {
|
17
|
+
border-top-color: $color;
|
18
|
+
|
19
|
+
} @else if $direction == left {
|
20
|
+
border-right-color: $color;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
@else if ($direction == up-right) or ($direction == up-left) {
|
25
|
+
border-top: $size solid $color;
|
26
|
+
|
27
|
+
@if $direction == up-right {
|
28
|
+
border-left: $size solid transparent;
|
29
|
+
|
30
|
+
} @else if $direction == up-left {
|
31
|
+
border-right: $size solid transparent;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
@else if ($direction == down-right) or ($direction == down-left) {
|
36
|
+
border-bottom: $size solid $color;
|
37
|
+
|
38
|
+
@if $direction == down-right {
|
39
|
+
border-left: $size solid transparent;
|
40
|
+
|
41
|
+
} @else if $direction == down-left {
|
42
|
+
border-right: $size solid transparent;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
// http://www.w3.org/TR/css3-animations/#the-animation-name-property-
|
2
|
+
// 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.
|
3
|
+
|
4
|
+
// Official animation shorthand property.
|
5
|
+
@mixin animation ($animations...) {
|
6
|
+
@include prefixer(animation, $animations, webkit moz spec);
|
7
|
+
}
|
8
|
+
|
9
|
+
// Individual Animation Properties
|
10
|
+
@mixin animation-name ($names...) {
|
11
|
+
@include prefixer(animation-name, $names, webkit moz spec);
|
12
|
+
}
|
13
|
+
|
14
|
+
|
15
|
+
@mixin animation-duration ($times...) {
|
16
|
+
@include prefixer(animation-duration, $times, webkit moz spec);
|
17
|
+
}
|
18
|
+
|
19
|
+
|
20
|
+
@mixin animation-timing-function ($motions...) {
|
21
|
+
// ease | linear | ease-in | ease-out | ease-in-out
|
22
|
+
@include prefixer(animation-timing-function, $motions, webkit moz spec);
|
23
|
+
}
|
24
|
+
|
25
|
+
|
26
|
+
@mixin animation-iteration-count ($values...) {
|
27
|
+
// infinite | <number>
|
28
|
+
@include prefixer(animation-iteration-count, $values, webkit moz spec);
|
29
|
+
}
|
30
|
+
|
31
|
+
|
32
|
+
@mixin animation-direction ($directions...) {
|
33
|
+
// normal | alternate
|
34
|
+
@include prefixer(animation-direction, $directions, webkit moz spec);
|
35
|
+
}
|
36
|
+
|
37
|
+
|
38
|
+
@mixin animation-play-state ($states...) {
|
39
|
+
// running | paused
|
40
|
+
@include prefixer(animation-play-state, $states, webkit moz spec);
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
@mixin animation-delay ($times...) {
|
45
|
+
@include prefixer(animation-delay, $times, webkit moz spec);
|
46
|
+
}
|
47
|
+
|
48
|
+
|
49
|
+
@mixin animation-fill-mode ($modes...) {
|
50
|
+
// none | forwards | backwards | both
|
51
|
+
@include prefixer(animation-fill-mode, $modes, webkit moz spec);
|
52
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
//************************************************************************//
|
2
|
+
// Backface-visibility mixin
|
3
|
+
//************************************************************************//
|
4
|
+
@mixin backface-visibility($visibility) {
|
5
|
+
@include prefixer(backface-visibility, $visibility, webkit spec);
|
6
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
//************************************************************************//
|
2
|
+
// Background-image property for adding multiple background images with
|
3
|
+
// gradients, or for stringing multiple gradients together.
|
4
|
+
//************************************************************************//
|
5
|
+
|
6
|
+
@mixin background-image($images...) {
|
7
|
+
background-image: _add-prefix($images, webkit);
|
8
|
+
background-image: _add-prefix($images);
|
9
|
+
}
|
10
|
+
|
11
|
+
@function _add-prefix($images, $vendor: false) {
|
12
|
+
$images-prefixed: ();
|
13
|
+
$gradient-positions: false;
|
14
|
+
@for $i from 1 through length($images) {
|
15
|
+
$type: type-of(nth($images, $i)); // Get type of variable - List or String
|
16
|
+
|
17
|
+
// If variable is a list - Gradient
|
18
|
+
@if $type == list {
|
19
|
+
$gradient-type: nth(nth($images, $i), 1); // linear or radial
|
20
|
+
$gradient-pos: null;
|
21
|
+
$gradient-args: null;
|
22
|
+
|
23
|
+
@if ($gradient-type == linear) or ($gradient-type == radial) {
|
24
|
+
$gradient-pos: nth(nth($images, $i), 2); // Get gradient position
|
25
|
+
$gradient-args: nth(nth($images, $i), 3); // Get actual gradient (red, blue)
|
26
|
+
}
|
27
|
+
@else {
|
28
|
+
$gradient-args: nth(nth($images, $i), 2); // Get actual gradient (red, blue)
|
29
|
+
}
|
30
|
+
|
31
|
+
$gradient-positions: _gradient-positions-parser($gradient-type, $gradient-pos);
|
32
|
+
$gradient: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor);
|
33
|
+
$images-prefixed: append($images-prefixed, $gradient, comma);
|
34
|
+
}
|
35
|
+
// If variable is a string - Image
|
36
|
+
@else if $type == string {
|
37
|
+
$images-prefixed: join($images-prefixed, nth($images, $i), comma);
|
38
|
+
}
|
39
|
+
}
|
40
|
+
@return $images-prefixed;
|
41
|
+
}
|
42
|
+
|
43
|
+
//Examples:
|
44
|
+
//@include background-image(linear-gradient(top, orange, red));
|
45
|
+
//@include background-image(radial-gradient(50% 50%, cover circle, orange, red));
|
46
|
+
//@include background-image(url("/images/a.png"), linear-gradient(orange, red));
|
47
|
+
//@include background-image(url("image.png"), linear-gradient(orange, red), url("image.png"));
|
48
|
+
//@include background-image(linear-gradient(hsla(0, 100%, 100%, 0.25) 0%, hsla(0, 100%, 100%, 0.08) 50%, transparent 50%), linear-gradient(orange, red));
|
@@ -0,0 +1,103 @@
|
|
1
|
+
//************************************************************************//
|
2
|
+
// Background property for adding multiple backgrounds using shorthand
|
3
|
+
// notation.
|
4
|
+
//************************************************************************//
|
5
|
+
|
6
|
+
@mixin background(
|
7
|
+
$background-1 , $background-2: null,
|
8
|
+
$background-3: null, $background-4: null,
|
9
|
+
$background-5: null, $background-6: null,
|
10
|
+
$background-7: null, $background-8: null,
|
11
|
+
$background-9: null, $background-10: null,
|
12
|
+
$fallback: null
|
13
|
+
) {
|
14
|
+
$backgrounds: $background-1, $background-2,
|
15
|
+
$background-3, $background-4,
|
16
|
+
$background-5, $background-6,
|
17
|
+
$background-7, $background-8,
|
18
|
+
$background-9, $background-10;
|
19
|
+
|
20
|
+
$fallback-color: false;
|
21
|
+
@if (type-of($fallback) == color) or ($fallback == "transparent") {
|
22
|
+
$fallback-color: $fallback;
|
23
|
+
}
|
24
|
+
@else {
|
25
|
+
$fallback-color: _extract-background-color($backgrounds);
|
26
|
+
}
|
27
|
+
|
28
|
+
@if $fallback-color {
|
29
|
+
background-color: $fallback-color;
|
30
|
+
}
|
31
|
+
background: _background-add-prefix($backgrounds, webkit);
|
32
|
+
background: _background-add-prefix($backgrounds);
|
33
|
+
}
|
34
|
+
|
35
|
+
@function _extract-background-color($backgrounds) {
|
36
|
+
$final-bg-layer: nth($backgrounds, length($backgrounds));
|
37
|
+
@if type-of($final-bg-layer) == list {
|
38
|
+
@for $i from 1 through length($final-bg-layer) {
|
39
|
+
$value: nth($final-bg-layer, $i);
|
40
|
+
@if type-of($value) == color {
|
41
|
+
@return $value;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
@return false;
|
46
|
+
}
|
47
|
+
|
48
|
+
@function _background-add-prefix($backgrounds, $vendor: false) {
|
49
|
+
$backgrounds-prefixed: ();
|
50
|
+
|
51
|
+
@for $i from 1 through length($backgrounds) {
|
52
|
+
$shorthand: nth($backgrounds, $i); // Get member for current index
|
53
|
+
$type: type-of($shorthand); // Get type of variable - List (gradient) or String (image)
|
54
|
+
|
55
|
+
// If shorthand is a list (gradient)
|
56
|
+
@if $type == list {
|
57
|
+
$first-member: nth($shorthand, 1); // Get first member of shorthand
|
58
|
+
|
59
|
+
// Linear Gradient
|
60
|
+
@if index(linear radial, nth($first-member, 1)) {
|
61
|
+
$gradient-type: nth($first-member, 1); // linear || radial
|
62
|
+
$gradient-args: false;
|
63
|
+
$gradient-positions: false;
|
64
|
+
$shorthand-start: false;
|
65
|
+
@if type-of($first-member) == list { // Linear gradient plus additional shorthand values - lg(red,orange)repeat,...
|
66
|
+
$gradient-positions: nth($first-member, 2);
|
67
|
+
$gradient-args: nth($first-member, 3);
|
68
|
+
$shorthand-start: 2;
|
69
|
+
}
|
70
|
+
@else { // Linear gradient only - lg(red,orange),...
|
71
|
+
$gradient-positions: nth($shorthand, 2);
|
72
|
+
$gradient-args: nth($shorthand, 3); // Get gradient (red, blue)
|
73
|
+
}
|
74
|
+
|
75
|
+
$gradient-positions: _gradient-positions-parser($gradient-type, $gradient-positions);
|
76
|
+
$gradient: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor);
|
77
|
+
|
78
|
+
// Append any additional shorthand args to gradient
|
79
|
+
@if $shorthand-start {
|
80
|
+
@for $j from $shorthand-start through length($shorthand) {
|
81
|
+
$gradient: join($gradient, nth($shorthand, $j), space);
|
82
|
+
}
|
83
|
+
}
|
84
|
+
$backgrounds-prefixed: append($backgrounds-prefixed, $gradient, comma);
|
85
|
+
}
|
86
|
+
// Image with additional properties
|
87
|
+
@else {
|
88
|
+
$backgrounds-prefixed: append($backgrounds-prefixed, $shorthand, comma);
|
89
|
+
}
|
90
|
+
}
|
91
|
+
// If shorthand is a simple string (color or image)
|
92
|
+
@else if $type == string {
|
93
|
+
$backgrounds-prefixed: join($backgrounds-prefixed, $shorthand, comma);
|
94
|
+
}
|
95
|
+
}
|
96
|
+
@return $backgrounds-prefixed;
|
97
|
+
}
|
98
|
+
|
99
|
+
//Examples:
|
100
|
+
//@include background(linear-gradient(top, orange, red));
|
101
|
+
//@include background(radial-gradient(circle at 40% 40%, orange, red));
|
102
|
+
//@include background(url("/images/a.png") no-repeat, linear-gradient(orange, red));
|
103
|
+
//@include background(url("image.png") center center, linear-gradient(orange, red), url("image.png"));
|
@@ -0,0 +1,56 @@
|
|
1
|
+
@mixin border-image($images) {
|
2
|
+
-webkit-border-image: _border-add-prefix($images, webkit);
|
3
|
+
-moz-border-image: _border-add-prefix($images, moz);
|
4
|
+
-o-border-image: _border-add-prefix($images, o);
|
5
|
+
border-image: _border-add-prefix($images);
|
6
|
+
border-style: solid;
|
7
|
+
}
|
8
|
+
|
9
|
+
@function _border-add-prefix($images, $vendor: false) {
|
10
|
+
$border-image: null;
|
11
|
+
$images-type: type-of(nth($images, 1));
|
12
|
+
$first-var: nth(nth($images, 1), 1); // Get type of Gradient (Linear || radial)
|
13
|
+
|
14
|
+
// If input is a gradient
|
15
|
+
@if $images-type == string {
|
16
|
+
@if ($first-var == "linear") or ($first-var == "radial") {
|
17
|
+
$gradient-type: nth($images, 1); // Get type of gradient (linear || radial)
|
18
|
+
$gradient-pos: nth($images, 2); // Get gradient position
|
19
|
+
$gradient-args: nth($images, 3); // Get actual gradient (red, blue)
|
20
|
+
$gradient-positions: _gradient-positions-parser($gradient-type, $gradient-pos);
|
21
|
+
$border-image: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor);
|
22
|
+
}
|
23
|
+
// If input is a URL
|
24
|
+
@else {
|
25
|
+
$border-image: $images;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
// If input is gradient or url + additional args
|
29
|
+
@else if $images-type == list {
|
30
|
+
$type: type-of(nth($images, 1)); // Get type of variable - List or String
|
31
|
+
|
32
|
+
// If variable is a list - Gradient
|
33
|
+
@if $type == list {
|
34
|
+
$gradient: nth($images, 1);
|
35
|
+
$gradient-type: nth($gradient, 1); // Get type of gradient (linear || radial)
|
36
|
+
$gradient-pos: nth($gradient, 2); // Get gradient position
|
37
|
+
$gradient-args: nth($gradient, 3); // Get actual gradient (red, blue)
|
38
|
+
$gradient-positions: _gradient-positions-parser($gradient-type, $gradient-pos);
|
39
|
+
$border-image: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor);
|
40
|
+
|
41
|
+
@for $i from 2 through length($images) {
|
42
|
+
$border-image: append($border-image, nth($images, $i));
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
@return $border-image;
|
47
|
+
}
|
48
|
+
|
49
|
+
//Examples:
|
50
|
+
// @include border-image(url("image.png"));
|
51
|
+
// @include border-image(url("image.png") 20 stretch);
|
52
|
+
// @include border-image(linear-gradient(45deg, orange, yellow));
|
53
|
+
// @include border-image(linear-gradient(45deg, orange, yellow) stretch);
|
54
|
+
// @include border-image(linear-gradient(45deg, orange, yellow) 20 30 40 50 stretch round);
|
55
|
+
// @include border-image(radial-gradient(top, cover, orange, yellow, orange));
|
56
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
//************************************************************************//
|
2
|
+
// Shorthand Border-radius mixins
|
3
|
+
//************************************************************************//
|
4
|
+
@mixin border-top-radius($radii) {
|
5
|
+
@include prefixer(border-top-left-radius, $radii, spec);
|
6
|
+
@include prefixer(border-top-right-radius, $radii, spec);
|
7
|
+
}
|
8
|
+
|
9
|
+
@mixin border-bottom-radius($radii) {
|
10
|
+
@include prefixer(border-bottom-left-radius, $radii, spec);
|
11
|
+
@include prefixer(border-bottom-right-radius, $radii, spec);
|
12
|
+
}
|
13
|
+
|
14
|
+
@mixin border-left-radius($radii) {
|
15
|
+
@include prefixer(border-top-left-radius, $radii, spec);
|
16
|
+
@include prefixer(border-bottom-left-radius, $radii, spec);
|
17
|
+
}
|
18
|
+
|
19
|
+
@mixin border-right-radius($radii) {
|
20
|
+
@include prefixer(border-top-right-radius, $radii, spec);
|
21
|
+
@include prefixer(border-bottom-right-radius, $radii, spec);
|
22
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
@mixin columns($arg: auto) {
|
2
|
+
// <column-count> || <column-width>
|
3
|
+
@include prefixer(columns, $arg, webkit moz spec);
|
4
|
+
}
|
5
|
+
|
6
|
+
@mixin column-count($int: auto) {
|
7
|
+
// auto || integer
|
8
|
+
@include prefixer(column-count, $int, webkit moz spec);
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin column-gap($length: normal) {
|
12
|
+
// normal || length
|
13
|
+
@include prefixer(column-gap, $length, webkit moz spec);
|
14
|
+
}
|
15
|
+
|
16
|
+
@mixin column-fill($arg: auto) {
|
17
|
+
// auto || length
|
18
|
+
@include prefixer(columns-fill, $arg, webkit moz spec);
|
19
|
+
}
|
20
|
+
|
21
|
+
@mixin column-rule($arg) {
|
22
|
+
// <border-width> || <border-style> || <color>
|
23
|
+
@include prefixer(column-rule, $arg, webkit moz spec);
|
24
|
+
}
|
25
|
+
|
26
|
+
@mixin column-rule-color($color) {
|
27
|
+
@include prefixer(column-rule-color, $color, webkit moz spec);
|
28
|
+
}
|
29
|
+
|
30
|
+
@mixin column-rule-style($style: none) {
|
31
|
+
// none | hidden | dashed | dotted | double | groove | inset | inset | outset | ridge | solid
|
32
|
+
@include prefixer(column-rule-style, $style, webkit moz spec);
|
33
|
+
}
|
34
|
+
|
35
|
+
@mixin column-rule-width ($width: none) {
|
36
|
+
@include prefixer(column-rule-width, $width, webkit moz spec);
|
37
|
+
}
|
38
|
+
|
39
|
+
@mixin column-span($arg: none) {
|
40
|
+
// none || all
|
41
|
+
@include prefixer(column-span, $arg, webkit moz spec);
|
42
|
+
}
|
43
|
+
|
44
|
+
@mixin column-width($length: auto) {
|
45
|
+
// auto || length
|
46
|
+
@include prefixer(column-width, $length, webkit moz spec);
|
47
|
+
}
|
@@ -0,0 +1,321 @@
|
|
1
|
+
// CSS3 Flexible Box Model and property defaults
|
2
|
+
|
3
|
+
// Custom shorthand notation for flexbox
|
4
|
+
@mixin box($orient: inline-axis, $pack: start, $align: stretch) {
|
5
|
+
@include display-box;
|
6
|
+
@include box-orient($orient);
|
7
|
+
@include box-pack($pack);
|
8
|
+
@include box-align($align);
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin display-box {
|
12
|
+
display: -webkit-box;
|
13
|
+
display: -moz-box;
|
14
|
+
display: -ms-flexbox; // IE 10
|
15
|
+
display: box;
|
16
|
+
}
|
17
|
+
|
18
|
+
@mixin box-orient($orient: inline-axis) {
|
19
|
+
// horizontal|vertical|inline-axis|block-axis|inherit
|
20
|
+
@include prefixer(box-orient, $orient, webkit moz spec);
|
21
|
+
}
|
22
|
+
|
23
|
+
@mixin box-pack($pack: start) {
|
24
|
+
// start|end|center|justify
|
25
|
+
@include prefixer(box-pack, $pack, webkit moz spec);
|
26
|
+
-ms-flex-pack: $pack; // IE 10
|
27
|
+
}
|
28
|
+
|
29
|
+
@mixin box-align($align: stretch) {
|
30
|
+
// start|end|center|baseline|stretch
|
31
|
+
@include prefixer(box-align, $align, webkit moz spec);
|
32
|
+
-ms-flex-align: $align; // IE 10
|
33
|
+
}
|
34
|
+
|
35
|
+
@mixin box-direction($direction: normal) {
|
36
|
+
// normal|reverse|inherit
|
37
|
+
@include prefixer(box-direction, $direction, webkit moz spec);
|
38
|
+
-ms-flex-direction: $direction; // IE 10
|
39
|
+
}
|
40
|
+
|
41
|
+
@mixin box-lines($lines: single) {
|
42
|
+
// single|multiple
|
43
|
+
@include prefixer(box-lines, $lines, webkit moz spec);
|
44
|
+
}
|
45
|
+
|
46
|
+
@mixin box-ordinal-group($int: 1) {
|
47
|
+
@include prefixer(box-ordinal-group, $int, webkit moz spec);
|
48
|
+
-ms-flex-order: $int; // IE 10
|
49
|
+
}
|
50
|
+
|
51
|
+
@mixin box-flex($value: 0.0) {
|
52
|
+
@include prefixer(box-flex, $value, webkit moz spec);
|
53
|
+
-ms-flex: $value; // IE 10
|
54
|
+
}
|
55
|
+
|
56
|
+
@mixin box-flex-group($int: 1) {
|
57
|
+
@include prefixer(box-flex-group, $int, webkit moz spec);
|
58
|
+
}
|
59
|
+
|
60
|
+
// CSS3 Flexible Box Model and property defaults
|
61
|
+
// Unified attributes for 2009, 2011, and 2012 flavours.
|
62
|
+
|
63
|
+
// 2009 - display (box | inline-box)
|
64
|
+
// 2011 - display (flexbox | inline-flexbox)
|
65
|
+
// 2012 - display (flex | inline-flex)
|
66
|
+
@mixin display($value) {
|
67
|
+
// flex | inline-flex
|
68
|
+
@if $value == "flex" {
|
69
|
+
// 2009
|
70
|
+
display: -webkit-box;
|
71
|
+
display: -moz-box;
|
72
|
+
display: box;
|
73
|
+
|
74
|
+
// 2012
|
75
|
+
display: -webkit-flex;
|
76
|
+
display: -moz-flex;
|
77
|
+
display: -ms-flexbox; // 2011 (IE 10)
|
78
|
+
display: flex;
|
79
|
+
}
|
80
|
+
|
81
|
+
@elseif $value == "inline-flex" {
|
82
|
+
display: -webkit-inline-box;
|
83
|
+
display: -moz-inline-box;
|
84
|
+
display: inline-box;
|
85
|
+
|
86
|
+
display: -webkit-inline-flex;
|
87
|
+
display: -moz-inline-flex;
|
88
|
+
display: -ms-inline-flexbox;
|
89
|
+
display: inline-flex;
|
90
|
+
}
|
91
|
+
|
92
|
+
@else {
|
93
|
+
display: $value;
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
// 2009 - box-flex (integer)
|
98
|
+
// 2011 - flex (decimal | width decimal)
|
99
|
+
// 2012 - flex (integer integer width)
|
100
|
+
@mixin flex($value) {
|
101
|
+
|
102
|
+
// Grab flex-grow for older browsers.
|
103
|
+
$flex-grow: nth($value, 1);
|
104
|
+
|
105
|
+
// 2009
|
106
|
+
@include prefixer(box-flex, $flex-grow, webkit moz spec);
|
107
|
+
|
108
|
+
// 2011 (IE 10), 2012
|
109
|
+
@include prefixer(flex, $value, webkit moz ms spec);
|
110
|
+
}
|
111
|
+
|
112
|
+
// 2009 - box-orient ( horizontal | vertical | inline-axis | block-axis)
|
113
|
+
// - box-direction (normal | reverse)
|
114
|
+
// 2011 - flex-direction (row | row-reverse | column | column-reverse)
|
115
|
+
// 2012 - flex-direction (row | row-reverse | column | column-reverse)
|
116
|
+
@mixin flex-direction($value: row) {
|
117
|
+
|
118
|
+
// Alt values.
|
119
|
+
$value-2009: $value;
|
120
|
+
$value-2011: $value;
|
121
|
+
$direction: "normal";
|
122
|
+
|
123
|
+
@if $value == row {
|
124
|
+
$value-2009: horizontal;
|
125
|
+
}
|
126
|
+
|
127
|
+
@elseif $value == "row-reverse" {
|
128
|
+
$value-2009: horizontal;
|
129
|
+
$direction: reverse;
|
130
|
+
}
|
131
|
+
|
132
|
+
@elseif $value == column {
|
133
|
+
$value-2009: vertical;
|
134
|
+
}
|
135
|
+
|
136
|
+
@elseif $value == "column-reverse" {
|
137
|
+
$value-2009: vertical;
|
138
|
+
$direction: reverse;
|
139
|
+
}
|
140
|
+
|
141
|
+
// 2009
|
142
|
+
@include prefixer(box-orient, $value-2009, webkit moz spec);
|
143
|
+
@if $direction == "reverse" {
|
144
|
+
@include prefixer(box-direction, $direction, webkit moz spec);
|
145
|
+
}
|
146
|
+
|
147
|
+
// 2012
|
148
|
+
@include prefixer(flex-direction, $value, webkit moz spec);
|
149
|
+
|
150
|
+
// 2011 (IE 10)
|
151
|
+
-ms-flex-direction: $value;
|
152
|
+
}
|
153
|
+
|
154
|
+
// 2009 - box-lines (single | multiple)
|
155
|
+
// 2011 - flex-wrap (nowrap | wrap | wrap-reverse)
|
156
|
+
// 2012 - flex-wrap (nowrap | wrap | wrap-reverse)
|
157
|
+
@mixin flex-wrap($value: nowrap) {
|
158
|
+
|
159
|
+
// Alt values.
|
160
|
+
$alt-value: $value;
|
161
|
+
@if $value == nowrap {
|
162
|
+
$alt-value: single;
|
163
|
+
}
|
164
|
+
|
165
|
+
@elseif $value == wrap {
|
166
|
+
$alt-value: multiple;
|
167
|
+
}
|
168
|
+
|
169
|
+
@elseif $value == "wrap-reverse" {
|
170
|
+
$alt-value: multiple;
|
171
|
+
}
|
172
|
+
|
173
|
+
@include prefixer(box-lines, $alt-value, webkit moz spec);
|
174
|
+
@include prefixer(flex-wrap, $value, webkit moz ms spec);
|
175
|
+
}
|
176
|
+
|
177
|
+
// 2009 - TODO: parse values into flex-direction/flex-wrap
|
178
|
+
// 2011 - TODO: parse values into flex-direction/flex-wrap
|
179
|
+
// 2012 - flex-flow (flex-direction || flex-wrap)
|
180
|
+
@mixin flex-flow($value) {
|
181
|
+
@include prefixer(flex-flow, $value, webkit moz spec);
|
182
|
+
}
|
183
|
+
|
184
|
+
// 2009 - box-ordinal-group (integer)
|
185
|
+
// 2011 - flex-order (integer)
|
186
|
+
// 2012 - order (integer)
|
187
|
+
@mixin order($int: 0) {
|
188
|
+
// 2009
|
189
|
+
@include prefixer(box-ordinal-group, $int, webkit moz spec);
|
190
|
+
|
191
|
+
// 2012
|
192
|
+
@include prefixer(order, $int, webkit moz spec);
|
193
|
+
|
194
|
+
// 2011 (IE 10)
|
195
|
+
-ms-flex-order: $int;
|
196
|
+
}
|
197
|
+
|
198
|
+
// 2012 - flex-grow (number)
|
199
|
+
@mixin flex-grow($number: 0) {
|
200
|
+
@include prefixer(flex-grow, $number, webkit moz spec);
|
201
|
+
-ms-flex-positive: $number;
|
202
|
+
}
|
203
|
+
|
204
|
+
// 2012 - flex-shrink (number)
|
205
|
+
@mixin flex-shrink($number: 1) {
|
206
|
+
@include prefixer(flex-shrink, $number, webkit moz spec);
|
207
|
+
-ms-flex-negative: $number;
|
208
|
+
}
|
209
|
+
|
210
|
+
// 2012 - flex-basis (number)
|
211
|
+
@mixin flex-basis($width: auto) {
|
212
|
+
@include prefixer(flex-basis, $width, webkit moz spec);
|
213
|
+
-ms-flex-preferred-size: $width;
|
214
|
+
}
|
215
|
+
|
216
|
+
// 2009 - box-pack (start | end | center | justify)
|
217
|
+
// 2011 - flex-pack (start | end | center | justify)
|
218
|
+
// 2012 - justify-content (flex-start | flex-end | center | space-between | space-around)
|
219
|
+
@mixin justify-content ($value: flex-start) {
|
220
|
+
|
221
|
+
// Alt values.
|
222
|
+
$alt-value: $value;
|
223
|
+
@if $value == "flex-start" {
|
224
|
+
$alt-value: start;
|
225
|
+
}
|
226
|
+
|
227
|
+
@elseif $value == "flex-end" {
|
228
|
+
$alt-value: end;
|
229
|
+
}
|
230
|
+
|
231
|
+
@elseif $value == "space-between" {
|
232
|
+
$alt-value: justify;
|
233
|
+
}
|
234
|
+
|
235
|
+
@elseif $value == "space-around" {
|
236
|
+
$alt-value: center;
|
237
|
+
}
|
238
|
+
|
239
|
+
// 2009
|
240
|
+
@include prefixer(box-pack, $alt-value, webkit moz spec);
|
241
|
+
|
242
|
+
// 2012
|
243
|
+
@include prefixer(justify-content, $value, webkit moz ms o spec);
|
244
|
+
|
245
|
+
// 2011 (IE 10)
|
246
|
+
-ms-flex-pack: $alt-value;
|
247
|
+
}
|
248
|
+
|
249
|
+
// 2009 - box-align (start | end | center | baseline | stretch)
|
250
|
+
// 2011 - flex-align (start | end | center | baseline | stretch)
|
251
|
+
// 2012 - align-items (flex-start | flex-end | center | baseline | stretch)
|
252
|
+
@mixin align-items($value: stretch) {
|
253
|
+
|
254
|
+
$alt-value: $value;
|
255
|
+
|
256
|
+
@if $value == "flex-start" {
|
257
|
+
$alt-value: start;
|
258
|
+
}
|
259
|
+
|
260
|
+
@elseif $value == "flex-end" {
|
261
|
+
$alt-value: end;
|
262
|
+
}
|
263
|
+
|
264
|
+
// 2009
|
265
|
+
@include prefixer(box-align, $alt-value, webkit moz spec);
|
266
|
+
|
267
|
+
// 2012
|
268
|
+
@include prefixer(align-items, $value, webkit moz ms o spec);
|
269
|
+
|
270
|
+
// 2011 (IE 10)
|
271
|
+
-ms-flex-align: $alt-value;
|
272
|
+
}
|
273
|
+
|
274
|
+
// 2011 - flex-item-align (auto | start | end | center | baseline | stretch)
|
275
|
+
// 2012 - align-self (auto | flex-start | flex-end | center | baseline | stretch)
|
276
|
+
@mixin align-self($value: auto) {
|
277
|
+
|
278
|
+
$value-2011: $value;
|
279
|
+
@if $value == "flex-start" {
|
280
|
+
$value-2011: start;
|
281
|
+
}
|
282
|
+
|
283
|
+
@elseif $value == "flex-end" {
|
284
|
+
$value-2011: end;
|
285
|
+
}
|
286
|
+
|
287
|
+
// 2012
|
288
|
+
@include prefixer(align-self, $value, webkit moz spec);
|
289
|
+
|
290
|
+
// 2011 (IE 10)
|
291
|
+
-ms-flex-item-align: $value-2011;
|
292
|
+
}
|
293
|
+
|
294
|
+
// 2011 - flex-line-pack (start | end | center | justify | distribute | stretch)
|
295
|
+
// 2012 - align-content (flex-start | flex-end | center | space-between | space-around | stretch)
|
296
|
+
@mixin align-content($value: stretch) {
|
297
|
+
|
298
|
+
$value-2011: $value;
|
299
|
+
@if $value == "flex-start" {
|
300
|
+
$value-2011: start;
|
301
|
+
}
|
302
|
+
|
303
|
+
@elseif $value == "flex-end" {
|
304
|
+
$value-2011: end;
|
305
|
+
}
|
306
|
+
|
307
|
+
@elseif $value == "space-between" {
|
308
|
+
$value-2011: justify;
|
309
|
+
}
|
310
|
+
|
311
|
+
@elseif $value == "space-around" {
|
312
|
+
$value-2011: distribute;
|
313
|
+
}
|
314
|
+
|
315
|
+
// 2012
|
316
|
+
@include prefixer(align-content, $value, webkit moz spec);
|
317
|
+
|
318
|
+
// 2011 (IE 10)
|
319
|
+
-ms-flex-line-pack: $value-2011;
|
320
|
+
}
|
321
|
+
|