bourbon-compass 2.1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bourbon-compass.rb +4 -0
- data/readme.md +31 -0
- data/stylesheets/bourbon/_bourbon.scss +40 -0
- data/stylesheets/bourbon/addons/_button.scss +273 -0
- data/stylesheets/bourbon/addons/_clearfix.scss +29 -0
- data/stylesheets/bourbon/addons/_font-face.scss +12 -0
- data/stylesheets/bourbon/addons/_font-family.scss +5 -0
- data/stylesheets/bourbon/addons/_hide-text.scss +15 -0
- data/stylesheets/bourbon/addons/_html5-input-types.scss +36 -0
- data/stylesheets/bourbon/addons/_position.scss +42 -0
- data/stylesheets/bourbon/addons/_timing-functions.scss +32 -0
- data/stylesheets/bourbon/css3/_animation.scss +125 -0
- data/stylesheets/bourbon/css3/_appearance.scss +3 -0
- data/stylesheets/bourbon/css3/_background-image.scss +57 -0
- data/stylesheets/bourbon/css3/_background-size.scss +11 -0
- data/stylesheets/bourbon/css3/_background.scss +107 -0
- data/stylesheets/bourbon/css3/_border-image.scss +56 -0
- data/stylesheets/bourbon/css3/_border-radius.scss +44 -0
- data/stylesheets/bourbon/css3/_box-shadow.scss +12 -0
- data/stylesheets/bourbon/css3/_box-sizing.scss +4 -0
- data/stylesheets/bourbon/css3/_columns.scss +47 -0
- data/stylesheets/bourbon/css3/_flex-box.scss +52 -0
- data/stylesheets/bourbon/css3/_inline-block.scss +8 -0
- data/stylesheets/bourbon/css3/_linear-gradient.scss +43 -0
- data/stylesheets/bourbon/css3/_prefixer.scss +12 -0
- data/stylesheets/bourbon/css3/_radial-gradient.scss +76 -0
- data/stylesheets/bourbon/css3/_transform.scss +11 -0
- data/stylesheets/bourbon/css3/_transition.scss +72 -0
- data/stylesheets/bourbon/css3/_user-select.scss +3 -0
- data/stylesheets/bourbon/functions/_deprecated-webkit-gradient.scss +44 -0
- data/stylesheets/bourbon/functions/_flex-grid.scss +35 -0
- data/stylesheets/bourbon/functions/_grid-width.scss +13 -0
- data/stylesheets/bourbon/functions/_linear-gradient.scss +23 -0
- data/stylesheets/bourbon/functions/_modular-scale.scss +40 -0
- data/stylesheets/bourbon/functions/_radial-gradient.scss +62 -0
- data/stylesheets/bourbon/functions/_render-gradients.scss +14 -0
- data/stylesheets/bourbon/functions/_tint-shade.scss +9 -0
- data/stylesheets/bourbon/functions/_transition-property-name.scss +22 -0
- data/stylesheets/bourbon/lib/bourbon.rb +19 -0
- data/stylesheets/bourbon/lib/bourbon/sass_extensions.rb +6 -0
- data/stylesheets/bourbon/lib/bourbon/sass_extensions/functions.rb +13 -0
- data/stylesheets/bourbon/lib/bourbon/sass_extensions/functions/compact.rb +14 -0
- metadata +118 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
@mixin position ($position: relative, $coordinates: 0 0 0 0) {
|
2
|
+
|
3
|
+
@if type-of($position) == list {
|
4
|
+
$coordinates: $position;
|
5
|
+
$position: relative;
|
6
|
+
}
|
7
|
+
|
8
|
+
$top: nth($coordinates, 1);
|
9
|
+
$right: nth($coordinates, 2);
|
10
|
+
$bottom: nth($coordinates, 3);
|
11
|
+
$left: nth($coordinates, 4);
|
12
|
+
|
13
|
+
position: $position;
|
14
|
+
|
15
|
+
@if $top == auto {
|
16
|
+
top: $top;
|
17
|
+
}
|
18
|
+
@else if not(unitless($top)) {
|
19
|
+
top: $top;
|
20
|
+
}
|
21
|
+
|
22
|
+
@if $right == auto {
|
23
|
+
right: $right;
|
24
|
+
}
|
25
|
+
@else if not(unitless($right)) {
|
26
|
+
right: $right;
|
27
|
+
}
|
28
|
+
|
29
|
+
@if $bottom == auto {
|
30
|
+
bottom: $bottom;
|
31
|
+
}
|
32
|
+
@else if not(unitless($bottom)) {
|
33
|
+
bottom: $bottom;
|
34
|
+
}
|
35
|
+
|
36
|
+
@if $left == auto {
|
37
|
+
left: $left;
|
38
|
+
}
|
39
|
+
@else if not(unitless($left)) {
|
40
|
+
left: $left;
|
41
|
+
}
|
42
|
+
}
|
@@ -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,125 @@
|
|
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 ($animation-1,
|
6
|
+
$animation-2: false, $animation-3: false,
|
7
|
+
$animation-4: false, $animation-5: false,
|
8
|
+
$animation-6: false, $animation-7: false,
|
9
|
+
$animation-8: false, $animation-9: false)
|
10
|
+
{
|
11
|
+
$full: compact($animation-1, $animation-2, $animation-3, $animation-4,
|
12
|
+
$animation-5, $animation-6, $animation-7, $animation-8, $animation-9);
|
13
|
+
|
14
|
+
@include prefixer(animation, $full);
|
15
|
+
}
|
16
|
+
|
17
|
+
// Individual Animation Properties
|
18
|
+
@mixin animation-name ($name-1,
|
19
|
+
$name-2: false, $name-3: false,
|
20
|
+
$name-4: false, $name-5: false,
|
21
|
+
$name-6: false, $name-7: false,
|
22
|
+
$name-8: false, $name-9: false)
|
23
|
+
{
|
24
|
+
$full: compact($name-1, $name-2, $name-3, $name-4,
|
25
|
+
$name-5, $name-6, $name-7, $name-8, $name-9);
|
26
|
+
|
27
|
+
@include prefixer(animation-name, $full);
|
28
|
+
}
|
29
|
+
|
30
|
+
|
31
|
+
@mixin animation-duration ($time-1: 0,
|
32
|
+
$time-2: false, $time-3: false,
|
33
|
+
$time-4: false, $time-5: false,
|
34
|
+
$time-6: false, $time-7: false,
|
35
|
+
$time-8: false, $time-9: false)
|
36
|
+
{
|
37
|
+
$full: compact($time-1, $time-2, $time-3, $time-4,
|
38
|
+
$time-5, $time-6, $time-7, $time-8, $time-9);
|
39
|
+
|
40
|
+
@include prefixer(animation-duration, $full);
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
@mixin animation-timing-function ($motion-1: ease,
|
45
|
+
// ease | linear | ease-in | ease-out | ease-in-out
|
46
|
+
$motion-2: false, $motion-3: false,
|
47
|
+
$motion-4: false, $motion-5: false,
|
48
|
+
$motion-6: false, $motion-7: false,
|
49
|
+
$motion-8: false, $motion-9: false)
|
50
|
+
{
|
51
|
+
$full: compact($motion-1, $motion-2, $motion-3, $motion-4,
|
52
|
+
$motion-5, $motion-6, $motion-7, $motion-8, $motion-9);
|
53
|
+
|
54
|
+
@include prefixer(animation-timing-function, $full);
|
55
|
+
}
|
56
|
+
|
57
|
+
|
58
|
+
@mixin animation-iteration-count ($value-1: 1,
|
59
|
+
// infinite | <number>
|
60
|
+
$value-2: false, $value-3: false,
|
61
|
+
$value-4: false, $value-5: false,
|
62
|
+
$value-6: false, $value-7: false,
|
63
|
+
$value-8: false, $value-9: false)
|
64
|
+
{
|
65
|
+
$full: compact($value-1, $value-2, $value-3, $value-4,
|
66
|
+
$value-5, $value-6, $value-7, $value-8, $value-9);
|
67
|
+
|
68
|
+
@include prefixer(animation-iteration-count, $full);
|
69
|
+
}
|
70
|
+
|
71
|
+
|
72
|
+
@mixin animation-direction ($direction-1: normal,
|
73
|
+
// normal | alternate
|
74
|
+
$direction-2: false, $direction-3: false,
|
75
|
+
$direction-4: false, $direction-5: false,
|
76
|
+
$direction-6: false, $direction-7: false,
|
77
|
+
$direction-8: false, $direction-9: false)
|
78
|
+
{
|
79
|
+
$full: compact($direction-1, $direction-2, $direction-3, $direction-4,
|
80
|
+
$direction-5, $direction-6, $direction-7, $direction-8, $direction-9);
|
81
|
+
|
82
|
+
@include prefixer(animation-direction, $full);
|
83
|
+
}
|
84
|
+
|
85
|
+
|
86
|
+
@mixin animation-play-state ($state-1: running,
|
87
|
+
// running | paused
|
88
|
+
$state-2: false, $state-3: false,
|
89
|
+
$state-4: false, $state-5: false,
|
90
|
+
$state-6: false, $state-7: false,
|
91
|
+
$state-8: false, $state-9: false)
|
92
|
+
{
|
93
|
+
$full: compact($state-1, $state-2, $state-3, $state-4,
|
94
|
+
$state-5, $state-6, $state-7, $state-8, $state-9);
|
95
|
+
|
96
|
+
@include prefixer(animation-play-state, $full);
|
97
|
+
}
|
98
|
+
|
99
|
+
|
100
|
+
@mixin animation-delay ($time-1: 0,
|
101
|
+
$time-2: false, $time-3: false,
|
102
|
+
$time-4: false, $time-5: false,
|
103
|
+
$time-6: false, $time-7: false,
|
104
|
+
$time-8: false, $time-9: false)
|
105
|
+
{
|
106
|
+
$full: compact($time-1, $time-2, $time-3, $time-4,
|
107
|
+
$time-5, $time-6, $time-7, $time-8, $time-9);
|
108
|
+
|
109
|
+
@include prefixer(animation-delay, $full);
|
110
|
+
}
|
111
|
+
|
112
|
+
|
113
|
+
@mixin animation-fill-mode ($mode-1: none,
|
114
|
+
// http://goo.gl/l6ckm
|
115
|
+
// none | forwards | backwards | both
|
116
|
+
$mode-2: false, $mode-3: false,
|
117
|
+
$mode-4: false, $mode-5: false,
|
118
|
+
$mode-6: false, $mode-7: false,
|
119
|
+
$mode-8: false, $mode-9: false)
|
120
|
+
{
|
121
|
+
$full: compact($mode-1, $mode-2, $mode-3, $mode-4,
|
122
|
+
$mode-5, $mode-6, $mode-7, $mode-8, $mode-9);
|
123
|
+
|
124
|
+
@include prefixer(animation-fill-mode, $full);
|
125
|
+
}
|
@@ -0,0 +1,57 @@
|
|
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(
|
7
|
+
$image-1 , $image-2: false,
|
8
|
+
$image-3: false, $image-4: false,
|
9
|
+
$image-5: false, $image-6: false,
|
10
|
+
$image-7: false, $image-8: false,
|
11
|
+
$image-9: false, $image-10: false
|
12
|
+
) {
|
13
|
+
$images: compact($image-1, $image-2,
|
14
|
+
$image-3, $image-4,
|
15
|
+
$image-5, $image-6,
|
16
|
+
$image-7, $image-8,
|
17
|
+
$image-9, $image-10);
|
18
|
+
|
19
|
+
background-image: add-prefix($images, webkit);
|
20
|
+
background-image: add-prefix($images, moz);
|
21
|
+
background-image: add-prefix($images, ms);
|
22
|
+
background-image: add-prefix($images, o);
|
23
|
+
background-image: add-prefix($images);
|
24
|
+
}
|
25
|
+
|
26
|
+
|
27
|
+
@function add-prefix($images, $vendor: false) {
|
28
|
+
$images-prefixed: ();
|
29
|
+
|
30
|
+
@for $i from 1 through length($images) {
|
31
|
+
$type: type-of(nth($images, $i)); // Get type of variable - List or String
|
32
|
+
|
33
|
+
// If variable is a list - Gradient
|
34
|
+
@if $type == list {
|
35
|
+
$gradient-type: nth(nth($images, $i), 1); // Get type of gradient (linear || radial)
|
36
|
+
$gradient-args: nth(nth($images, $i), 2); // Get actual gradient (red, blue)
|
37
|
+
|
38
|
+
$gradient: render-gradients($gradient-args, $gradient-type, $vendor);
|
39
|
+
$images-prefixed: append($images-prefixed, $gradient, comma);
|
40
|
+
}
|
41
|
+
|
42
|
+
// If variable is a string - Image
|
43
|
+
@else if $type == string {
|
44
|
+
$images-prefixed: join($images-prefixed, nth($images, $i), comma);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
@return $images-prefixed;
|
48
|
+
}
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
//Examples:
|
53
|
+
//@include background-image(linear-gradient(top, orange, red));
|
54
|
+
//@include background-image(radial-gradient(50% 50%, cover circle, orange, red));
|
55
|
+
//@include background-image(url("/images/a.png"), linear-gradient(orange, red));
|
56
|
+
//@include background-image(url("image.png"), linear-gradient(orange, red), url("image.png"));
|
57
|
+
//@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,11 @@
|
|
1
|
+
@mixin background-size ($length-1,
|
2
|
+
$length-2: false, $length-3: false,
|
3
|
+
$length-4: false, $length-5: false,
|
4
|
+
$length-6: false, $length-7: false,
|
5
|
+
$length-8: false, $length-9: false)
|
6
|
+
{
|
7
|
+
$full: compact($length-1, $length-2, $length-3, $length-4,
|
8
|
+
$length-5, $length-6, $length-7, $length-8, $length-9);
|
9
|
+
|
10
|
+
@include prefixer(background-size, $full, webkit, moz, ms, o);
|
11
|
+
}
|
@@ -0,0 +1,107 @@
|
|
1
|
+
//************************************************************************//
|
2
|
+
// Background property for adding multiple backgrounds using shorthand
|
3
|
+
// notation.
|
4
|
+
//************************************************************************//
|
5
|
+
|
6
|
+
@mixin background(
|
7
|
+
$background-1 , $background-2: false,
|
8
|
+
$background-3: false, $background-4: false,
|
9
|
+
$background-5: false, $background-6: false,
|
10
|
+
$background-7: false, $background-8: false,
|
11
|
+
$background-9: false, $background-10: false,
|
12
|
+
$fallback: false
|
13
|
+
) {
|
14
|
+
$backgrounds: compact($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, moz);
|
33
|
+
background: background-add-prefix($backgrounds, ms);
|
34
|
+
background: background-add-prefix($backgrounds, o);
|
35
|
+
background: background-add-prefix($backgrounds);
|
36
|
+
}
|
37
|
+
|
38
|
+
@function extract-background-color($backgrounds) {
|
39
|
+
$final-bg-layer: nth($backgrounds, length($backgrounds));
|
40
|
+
@if type-of($final-bg-layer) == list {
|
41
|
+
@for $i from 1 through length($final-bg-layer) {
|
42
|
+
$value: nth($final-bg-layer, $i);
|
43
|
+
@if type-of($value) == color {
|
44
|
+
@return $value;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
@return false;
|
49
|
+
}
|
50
|
+
|
51
|
+
|
52
|
+
@function background-add-prefix($backgrounds, $vendor: false) {
|
53
|
+
$backgrounds-prefixed: ();
|
54
|
+
|
55
|
+
@for $i from 1 through length($backgrounds) {
|
56
|
+
$shorthand: nth($backgrounds, $i); // Get member for current index
|
57
|
+
$type: type-of($shorthand); // Get type of variable - List or String
|
58
|
+
|
59
|
+
// If shorthand is a list
|
60
|
+
@if $type == list {
|
61
|
+
$first-member: nth($shorthand, 1); // Get first member of shorthand
|
62
|
+
|
63
|
+
// Linear Gradient
|
64
|
+
@if index(linear radial, nth($first-member, 1)) {
|
65
|
+
$gradient-type: nth($first-member, 1); // linear || radial
|
66
|
+
|
67
|
+
// Get actual gradient (red, blue)
|
68
|
+
$gradient-args: false;
|
69
|
+
$shorthand-start: false;
|
70
|
+
// Linear gradient and positioning, repeat, etc. values
|
71
|
+
@if type-of($first-member) == list {
|
72
|
+
$gradient-args: nth($first-member, 2);
|
73
|
+
$shorthand-start: 2;
|
74
|
+
}
|
75
|
+
// Linear gradient only
|
76
|
+
@else {
|
77
|
+
$gradient-args: nth($shorthand, 2); // Get actual gradient (red, blue)
|
78
|
+
$shorthand-start: 3;
|
79
|
+
}
|
80
|
+
|
81
|
+
$gradient: render-gradients($gradient-args, $gradient-type, $vendor);
|
82
|
+
@for $j from $shorthand-start through length($shorthand) {
|
83
|
+
$gradient: join($gradient, nth($shorthand, $j), space);
|
84
|
+
}
|
85
|
+
$backgrounds-prefixed: append($backgrounds-prefixed, $gradient, comma);
|
86
|
+
}
|
87
|
+
|
88
|
+
// Image with additional properties
|
89
|
+
@else {
|
90
|
+
$backgrounds-prefixed: append($backgrounds-prefixed, $shorthand, comma);
|
91
|
+
}
|
92
|
+
|
93
|
+
}
|
94
|
+
|
95
|
+
// If shorthand is a simple string, color or image
|
96
|
+
@else if $type == string {
|
97
|
+
$backgrounds-prefixed: join($backgrounds-prefixed, $shorthand, comma);
|
98
|
+
}
|
99
|
+
}
|
100
|
+
@return $backgrounds-prefixed;
|
101
|
+
}
|
102
|
+
|
103
|
+
//Examples:
|
104
|
+
//@include background(linear-gradient(top, orange, red));
|
105
|
+
//@include background(radial-gradient(50% 50%, cover circle, orange, red));
|
106
|
+
//@include background(url("/images/a.png") no-repeat, linear-gradient(orange, red));
|
107
|
+
//@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
|
+
}
|
7
|
+
|
8
|
+
@function border-add-prefix($images, $vendor: false) {
|
9
|
+
$border-image: ();
|
10
|
+
$images-type: type-of(nth($images, 1));
|
11
|
+
$first-var: nth(nth($images, 1), 1); // Get type of Gradient (Linear || radial)
|
12
|
+
|
13
|
+
// If input is a gradient
|
14
|
+
@if $images-type == string {
|
15
|
+
@if ($first-var == "linear") or ($first-var == "radial") {
|
16
|
+
@for $i from 2 through length($images) {
|
17
|
+
$gradient-type: nth($images, 1); // Get type of gradient (linear || radial)
|
18
|
+
$gradient-args: nth($images, $i); // Get actual gradient (red, blue)
|
19
|
+
$border-image: render-gradients($gradient-args, $gradient-type, $vendor);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
// If input is a URL
|
24
|
+
@else {
|
25
|
+
$border-image: $images;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
// If input is gradient or url + additional args
|
30
|
+
@else if $images-type == list {
|
31
|
+
@for $i from 1 through length($images) {
|
32
|
+
$type: type-of(nth($images, $i)); // Get type of variable - List or String
|
33
|
+
|
34
|
+
// If variable is a list - Gradient
|
35
|
+
@if $type == list {
|
36
|
+
$gradient-type: nth(nth($images, $i), 1); // Get type of gradient (linear || radial)
|
37
|
+
$gradient-args: nth(nth($images, $i), 2); // Get actual gradient (red, blue)
|
38
|
+
$border-image: render-gradients($gradient-args, $gradient-type, $vendor);
|
39
|
+
}
|
40
|
+
|
41
|
+
// If variable is a string - Image or number
|
42
|
+
@else if ($type == string) or ($type == number) {
|
43
|
+
$border-image: append($border-image, nth($images, $i));
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
@return $border-image;
|
48
|
+
}
|
49
|
+
|
50
|
+
//Examples:
|
51
|
+
// @include border-image(url("image.png"));
|
52
|
+
// @include border-image(url("image.png") 20 stretch);
|
53
|
+
// @include border-image(linear-gradient(45deg, orange, yellow));
|
54
|
+
// @include border-image(linear-gradient(45deg, orange, yellow) stretch);
|
55
|
+
// @include border-image(linear-gradient(45deg, orange, yellow) 20 30 40 50 stretch round);
|
56
|
+
// @include border-image(radial-gradient(top, cover, orange, yellow, orange));
|
@@ -0,0 +1,44 @@
|
|
1
|
+
@mixin border-radius ($radii) {
|
2
|
+
@include prefixer(border-radius, $radii, webkit, not moz);
|
3
|
+
@warn "border-radius mixin is deprecated and will be removed in the next major version release.";
|
4
|
+
}
|
5
|
+
|
6
|
+
@mixin border-top-left-radius($radii) {
|
7
|
+
@include prefixer(border-top-left-radius, $radii, webkit, not moz);
|
8
|
+
@warn "border-top-left-radius mixin is deprecated and will be removed in the next major version release.";
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin border-top-right-radius($radii) {
|
12
|
+
@include prefixer(border-top-right-radius, $radii, webkit, not moz);
|
13
|
+
@warn "border-top-right-radius mixin is deprecated and will be removed in the next major version release.";
|
14
|
+
}
|
15
|
+
|
16
|
+
@mixin border-bottom-left-radius($radii) {
|
17
|
+
@include prefixer(border-bottom-left-radius, $radii, webkit, not moz);
|
18
|
+
@warn "border-bottom-left-radius mixin is deprecated and will be removed in the next major version release.";
|
19
|
+
}
|
20
|
+
|
21
|
+
@mixin border-bottom-right-radius($radii) {
|
22
|
+
@include prefixer(border-bottom-right-radius, $radii, webkit, not moz);
|
23
|
+
@warn "border-bottom-right-radius mixin is deprecated and will be removed in the next major version release.";
|
24
|
+
}
|
25
|
+
|
26
|
+
@mixin border-top-radius($radii) {
|
27
|
+
@include border-top-left-radius($radii);
|
28
|
+
@include border-top-right-radius($radii);
|
29
|
+
}
|
30
|
+
|
31
|
+
@mixin border-right-radius($radii) {
|
32
|
+
@include border-top-right-radius($radii);
|
33
|
+
@include border-bottom-right-radius($radii);
|
34
|
+
}
|
35
|
+
|
36
|
+
@mixin border-bottom-radius($radii) {
|
37
|
+
@include border-bottom-left-radius($radii);
|
38
|
+
@include border-bottom-right-radius($radii);
|
39
|
+
}
|
40
|
+
|
41
|
+
@mixin border-left-radius($radii) {
|
42
|
+
@include border-top-left-radius($radii);
|
43
|
+
@include border-bottom-left-radius($radii);
|
44
|
+
}
|