bourbon-compass 3.1.8 → 3.2.0.beta.1.a
Sign up to get free protection for your applications and to get access to all the features.
- data/stylesheets/bourbon/_bourbon.scss +12 -2
- data/stylesheets/bourbon/addons/_button.scss +3 -3
- data/stylesheets/bourbon/addons/_clearfix.scss +5 -11
- data/stylesheets/bourbon/addons/_directional-values.scss +114 -0
- data/stylesheets/bourbon/addons/_ellipsis.scss +7 -0
- data/stylesheets/bourbon/addons/_font-family.scss +1 -1
- data/stylesheets/bourbon/addons/_hide-text.scss +8 -3
- data/stylesheets/bourbon/addons/_html5-input-types.scss +57 -3
- data/stylesheets/bourbon/addons/_position.scss +6 -16
- data/stylesheets/bourbon/addons/_prefixer.scss +1 -5
- data/stylesheets/bourbon/addons/_rem.scss +33 -0
- data/stylesheets/bourbon/addons/_retina-image.scss +4 -5
- data/stylesheets/bourbon/css3/_background.scss +8 -8
- data/stylesheets/bourbon/css3/_border-image.scss +1 -0
- data/stylesheets/bourbon/css3/_calc.scss +4 -0
- data/stylesheets/bourbon/css3/_flex-box.scss +269 -0
- data/stylesheets/bourbon/css3/_hyphens.scss +4 -0
- data/stylesheets/bourbon/css3/_image-rendering.scss +3 -3
- data/stylesheets/bourbon/css3/_keyframes.scss +0 -7
- data/stylesheets/bourbon/css3/_linear-gradient.scss +7 -10
- data/stylesheets/bourbon/css3/_radial-gradient.scss +6 -11
- data/stylesheets/bourbon/css3/_transition.scss +4 -4
- data/stylesheets/bourbon/functions/_golden-ratio.scss +3 -0
- data/stylesheets/bourbon/functions/_modular-scale.scss +54 -28
- data/stylesheets/bourbon/functions/_px-to-em.scss +7 -2
- data/stylesheets/bourbon/functions/_radial-gradient.scss +7 -7
- data/stylesheets/bourbon/functions/_strip-units.scss +5 -0
- data/stylesheets/bourbon/functions/_unpack.scss +17 -0
- data/stylesheets/bourbon/helpers/_radial-arg-parser.scss +4 -4
- data/stylesheets/bourbon/settings/_prefixer.scss +6 -0
- data/stylesheets/bourbon/settings/_px-to-em.scss +1 -0
- metadata +21 -13
- data/stylesheets/bourbon/functions/_compact.scss +0 -11
- data/stylesheets/bourbon/helpers/_deprecated-webkit-gradient.scss +0 -39
@@ -1,5 +1,8 @@
|
|
1
|
+
// Settings
|
2
|
+
@import "settings/prefixer";
|
3
|
+
@import "settings/px-to-em";
|
4
|
+
|
1
5
|
// Custom Helpers
|
2
|
-
@import "helpers/deprecated-webkit-gradient";
|
3
6
|
@import "helpers/gradient-positions-parser";
|
4
7
|
@import "helpers/linear-positions-parser";
|
5
8
|
@import "helpers/radial-arg-parser";
|
@@ -8,15 +11,17 @@
|
|
8
11
|
@import "helpers/shape-size-stripper";
|
9
12
|
|
10
13
|
// Custom Functions
|
11
|
-
@import "functions/compact";
|
12
14
|
@import "functions/flex-grid";
|
13
15
|
@import "functions/grid-width";
|
16
|
+
@import "functions/golden-ratio";
|
14
17
|
@import "functions/linear-gradient";
|
15
18
|
@import "functions/modular-scale";
|
16
19
|
@import "functions/px-to-em";
|
17
20
|
@import "functions/radial-gradient";
|
21
|
+
@import "functions/strip-units";
|
18
22
|
@import "functions/tint-shade";
|
19
23
|
@import "functions/transition-property-name";
|
24
|
+
@import "functions/unpack";
|
20
25
|
|
21
26
|
// CSS3 Mixins
|
22
27
|
@import "css3/animation";
|
@@ -27,9 +32,11 @@
|
|
27
32
|
@import "css3/border-image";
|
28
33
|
@import "css3/border-radius";
|
29
34
|
@import "css3/box-sizing";
|
35
|
+
@import "css3/calc";
|
30
36
|
@import "css3/columns";
|
31
37
|
@import "css3/flex-box";
|
32
38
|
@import "css3/font-face";
|
39
|
+
@import "css3/hyphens";
|
33
40
|
@import "css3/hidpi-media-query";
|
34
41
|
@import "css3/image-rendering";
|
35
42
|
@import "css3/inline-block";
|
@@ -45,11 +52,14 @@
|
|
45
52
|
// Addons & other mixins
|
46
53
|
@import "addons/button";
|
47
54
|
@import "addons/clearfix";
|
55
|
+
@import "addons/directional-values";
|
56
|
+
@import "addons/ellipsis";
|
48
57
|
@import "addons/font-family";
|
49
58
|
@import "addons/hide-text";
|
50
59
|
@import "addons/html5-input-types";
|
51
60
|
@import "addons/position";
|
52
61
|
@import "addons/prefixer";
|
62
|
+
@import "addons/rem";
|
53
63
|
@import "addons/retina-image";
|
54
64
|
@import "addons/size";
|
55
65
|
@import "addons/timing-functions";
|
@@ -68,7 +68,7 @@
|
|
68
68
|
box-shadow: inset 0 1px 0 0 $inset-shadow;
|
69
69
|
color: $color;
|
70
70
|
display: inline-block;
|
71
|
-
font-size:
|
71
|
+
font-size: inherit;
|
72
72
|
font-weight: bold;
|
73
73
|
@include linear-gradient ($base-color, $stop-gradient);
|
74
74
|
padding: 7px 18px;
|
@@ -140,7 +140,7 @@
|
|
140
140
|
box-shadow: inset 0 1px 0 0 $inset-shadow;
|
141
141
|
color: $color;
|
142
142
|
display: inline-block;
|
143
|
-
font-size:
|
143
|
+
font-size: inherit;
|
144
144
|
font-weight: bold;
|
145
145
|
@include linear-gradient(top, $base-color 0%, $second-stop 50%, $third-stop 50%, $fourth-stop 100%);
|
146
146
|
padding: 8px 20px;
|
@@ -211,7 +211,7 @@
|
|
211
211
|
box-shadow: inset 0 1px 0 0 $inset-shadow, 0 1px 2px 0 #b3b3b3;
|
212
212
|
color: $color;
|
213
213
|
display: inline-block;
|
214
|
-
font-size:
|
214
|
+
font-size: inherit;
|
215
215
|
font-weight: normal;
|
216
216
|
line-height: 1;
|
217
217
|
@include linear-gradient ($base-color, $stop-gradient);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
//
|
1
|
+
// Modern micro clearfix provides an easy way to contain floats without adding additional markup.
|
2
2
|
//
|
3
3
|
// Example usage:
|
4
4
|
//
|
@@ -12,18 +12,12 @@
|
|
12
12
|
// }
|
13
13
|
|
14
14
|
@mixin clearfix {
|
15
|
-
*zoom: 1;
|
16
|
-
|
17
|
-
&:before,
|
18
|
-
&:after {
|
19
|
-
content: " ";
|
20
|
-
display: table;
|
21
|
-
}
|
22
|
-
|
23
15
|
&:after {
|
24
|
-
|
16
|
+
content:"";
|
17
|
+
display:table;
|
18
|
+
clear:both;
|
25
19
|
}
|
26
20
|
}
|
27
21
|
|
28
22
|
// Acknowledgements
|
29
|
-
//
|
23
|
+
// Beat *that* clearfix: [Thierry Koblentz](http://www.css-101.org/articles/clearfix/latest-new-clearfix-so-far.php)
|
@@ -0,0 +1,114 @@
|
|
1
|
+
// directional-property mixins are shorthands
|
2
|
+
// for writing properties like the following
|
3
|
+
//
|
4
|
+
// @include margin(null 0 10px);
|
5
|
+
// ------
|
6
|
+
// margin-right: 0;
|
7
|
+
// margin-bottom: 10px;
|
8
|
+
// margin-left: 0;
|
9
|
+
//
|
10
|
+
// - or -
|
11
|
+
//
|
12
|
+
// @include border-style(dotted null);
|
13
|
+
// ------
|
14
|
+
// border-top-style: dotted;
|
15
|
+
// border-bottom-style: dotted;
|
16
|
+
//
|
17
|
+
// ------
|
18
|
+
//
|
19
|
+
// Note: You can also use false instead of null
|
20
|
+
|
21
|
+
@function collapse-directionals($vals) {
|
22
|
+
$output: null;
|
23
|
+
|
24
|
+
$A: nth( $vals, 1 );
|
25
|
+
$B: if( length($vals) < 2, $A, nth($vals, 2));
|
26
|
+
$C: if( length($vals) < 3, $A, nth($vals, 3));
|
27
|
+
$D: if( length($vals) < 2, $A, nth($vals, if( length($vals) < 4, 2, 4) ));
|
28
|
+
|
29
|
+
@if $A == 0 { $A: 0 }
|
30
|
+
@if $B == 0 { $B: 0 }
|
31
|
+
@if $C == 0 { $C: 0 }
|
32
|
+
@if $D == 0 { $D: 0 }
|
33
|
+
|
34
|
+
@if $A == $B and $A == $C and $A == $D { $output: $A }
|
35
|
+
@else if $A == $C and $B == $D { $output: $A $B }
|
36
|
+
@else if $B == $D { $output: $A $B $C }
|
37
|
+
@else { $output: $A $B $C $D }
|
38
|
+
|
39
|
+
@return $output;
|
40
|
+
}
|
41
|
+
|
42
|
+
@function contains-falsy($list) {
|
43
|
+
@each $item in $list {
|
44
|
+
@if not $item {
|
45
|
+
@return true;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
@return false;
|
50
|
+
}
|
51
|
+
|
52
|
+
@mixin directional-property($pre, $suf, $vals) {
|
53
|
+
// Property Names
|
54
|
+
$top: $pre + "-top" + if($suf, "-#{$suf}", "");
|
55
|
+
$bottom: $pre + "-bottom" + if($suf, "-#{$suf}", "");
|
56
|
+
$left: $pre + "-left" + if($suf, "-#{$suf}", "");
|
57
|
+
$right: $pre + "-right" + if($suf, "-#{$suf}", "");
|
58
|
+
$all: $pre + if($suf, "-#{$suf}", "");
|
59
|
+
|
60
|
+
// Get list inside $vals (is there a better way?)
|
61
|
+
@each $val in $vals { $vals: $val; }
|
62
|
+
|
63
|
+
$vals: collapse-directionals($vals);
|
64
|
+
|
65
|
+
@if contains-falsy($vals) {
|
66
|
+
@if nth($vals, 1) { #{$top}: nth($vals, 1); }
|
67
|
+
|
68
|
+
@if length($vals) == 1 {
|
69
|
+
@if nth($vals, 1) { #{$right}: nth($vals, 1); }
|
70
|
+
} @else {
|
71
|
+
@if nth($vals, 2) { #{$right}: nth($vals, 2); }
|
72
|
+
}
|
73
|
+
|
74
|
+
// prop: top/bottom right/left
|
75
|
+
@if length($vals) == 2 {
|
76
|
+
@if nth($vals, 1) { #{$bottom}: nth($vals, 1); }
|
77
|
+
@if nth($vals, 2) { #{$left}: nth($vals, 2); }
|
78
|
+
|
79
|
+
// prop: top right/left bottom
|
80
|
+
} @else if length($vals) == 3 {
|
81
|
+
@if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
|
82
|
+
@if nth($vals, 2) { #{$left}: nth($vals, 2); }
|
83
|
+
|
84
|
+
// prop: top right bottom left
|
85
|
+
} @else if length($vals) == 4 {
|
86
|
+
@if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
|
87
|
+
@if nth($vals, 4) { #{$left}: nth($vals, 4); }
|
88
|
+
}
|
89
|
+
|
90
|
+
// prop: top/right/bottom/left
|
91
|
+
} @else {
|
92
|
+
#{$all}: $vals;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
@mixin margin($vals...) {
|
97
|
+
@include directional-property(margin, false, $vals);
|
98
|
+
}
|
99
|
+
|
100
|
+
@mixin padding($vals...) {
|
101
|
+
@include directional-property(padding, false, $vals);
|
102
|
+
}
|
103
|
+
|
104
|
+
@mixin border-style($vals...) {
|
105
|
+
@include directional-property(border, style, $vals);
|
106
|
+
}
|
107
|
+
|
108
|
+
@mixin border-color($vals...) {
|
109
|
+
@include directional-property(border, color, $vals);
|
110
|
+
}
|
111
|
+
|
112
|
+
@mixin border-width($vals...) {
|
113
|
+
@include directional-property(border, width, $vals);
|
114
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
$georgia: Georgia, Cambria, "Times New Roman", Times, serif;
|
2
|
-
$helvetica: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
2
|
+
$helvetica: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
3
3
|
$lucida-grande: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
|
4
4
|
$monospace: "Bitstream Vera Sans Mono", Consolas, Courier, monospace;
|
5
5
|
$verdana: Verdana, Geneva, sans-serif;
|
@@ -22,7 +22,7 @@ $inputs-list: 'input[type="email"]',
|
|
22
22
|
|
23
23
|
$unquoted-inputs-list: ();
|
24
24
|
@each $input-type in $inputs-list {
|
25
|
-
$unquoted-inputs-list: append($unquoted-inputs-list, unquote($input-type), comma);
|
25
|
+
$unquoted-inputs-list: append($unquoted-inputs-list, unquote($input-type), comma) !global;
|
26
26
|
}
|
27
27
|
|
28
28
|
$all-text-inputs: $unquoted-inputs-list;
|
@@ -33,7 +33,7 @@ $all-text-inputs: $unquoted-inputs-list;
|
|
33
33
|
$all-text-inputs-hover: ();
|
34
34
|
@each $input-type in $unquoted-inputs-list {
|
35
35
|
$input-type-hover: $input-type + ":hover";
|
36
|
-
$all-text-inputs-hover: append($all-text-inputs-hover, $input-type-hover, comma);
|
36
|
+
$all-text-inputs-hover: append($all-text-inputs-hover, $input-type-hover, comma) !global;
|
37
37
|
}
|
38
38
|
|
39
39
|
// Focus Pseudo-class
|
@@ -41,7 +41,7 @@ $all-text-inputs-hover: ();
|
|
41
41
|
$all-text-inputs-focus: ();
|
42
42
|
@each $input-type in $unquoted-inputs-list {
|
43
43
|
$input-type-focus: $input-type + ":focus";
|
44
|
-
$all-text-inputs-focus: append($all-text-inputs-focus, $input-type-focus, comma);
|
44
|
+
$all-text-inputs-focus: append($all-text-inputs-focus, $input-type-focus, comma) !global;
|
45
45
|
}
|
46
46
|
|
47
47
|
// You must use interpolation on the variable:
|
@@ -54,3 +54,57 @@ $all-text-inputs-focus: ();
|
|
54
54
|
// #{$all-text-inputs}, textarea {
|
55
55
|
// border: 1px solid red;
|
56
56
|
// }
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
//************************************************************************//
|
61
|
+
// Generate a variable ($all-button-inputs) with a list of all html5
|
62
|
+
// input types that have a button-based input, excluding button.
|
63
|
+
//************************************************************************//
|
64
|
+
$inputs-button-list: 'input[type="button"]',
|
65
|
+
'input[type="reset"]',
|
66
|
+
'input[type="submit"]';
|
67
|
+
|
68
|
+
$unquoted-inputs-button-list: ();
|
69
|
+
@each $input-type in $inputs-button-list {
|
70
|
+
$unquoted-inputs-button-list: append($unquoted-inputs-button-list, unquote($input-type), comma);
|
71
|
+
}
|
72
|
+
|
73
|
+
$all-button-inputs: $unquoted-inputs-button-list;
|
74
|
+
|
75
|
+
|
76
|
+
// Hover Pseudo-class
|
77
|
+
//************************************************************************//
|
78
|
+
$all-button-inputs-hover: ();
|
79
|
+
@each $input-type in $unquoted-inputs-button-list {
|
80
|
+
$input-type-hover: $input-type + ":hover";
|
81
|
+
$all-button-inputs-hover: append($all-button-inputs-hover, $input-type-hover, comma);
|
82
|
+
}
|
83
|
+
|
84
|
+
// Focus Pseudo-class
|
85
|
+
//************************************************************************//
|
86
|
+
$all-button-inputs-focus: ();
|
87
|
+
@each $input-type in $unquoted-inputs-button-list {
|
88
|
+
$input-type-focus: $input-type + ":focus";
|
89
|
+
$all-button-inputs-focus: append($all-button-inputs-focus, $input-type-focus, comma);
|
90
|
+
}
|
91
|
+
|
92
|
+
// Active Pseudo-class
|
93
|
+
//************************************************************************//
|
94
|
+
$all-button-inputs-active: ();
|
95
|
+
@each $input-type in $unquoted-inputs-button-list {
|
96
|
+
$input-type-active: $input-type + ":active";
|
97
|
+
$all-button-inputs-active: append($all-button-inputs-active, $input-type-active, comma);
|
98
|
+
}
|
99
|
+
|
100
|
+
// You must use interpolation on the variable:
|
101
|
+
// #{$all-button-inputs}
|
102
|
+
// #{$all-button-inputs-hover}
|
103
|
+
// #{$all-button-inputs-focus}
|
104
|
+
// #{$all-button-inputs-active}
|
105
|
+
|
106
|
+
// Example
|
107
|
+
//************************************************************************//
|
108
|
+
// #{$all-button-inputs}, button {
|
109
|
+
// border: 1px solid red;
|
110
|
+
// }
|
@@ -5,6 +5,8 @@
|
|
5
5
|
$position: relative;
|
6
6
|
}
|
7
7
|
|
8
|
+
$coordinates: unpack($coordinates);
|
9
|
+
|
8
10
|
$top: nth($coordinates, 1);
|
9
11
|
$right: nth($coordinates, 2);
|
10
12
|
$bottom: nth($coordinates, 3);
|
@@ -12,31 +14,19 @@
|
|
12
14
|
|
13
15
|
position: $position;
|
14
16
|
|
15
|
-
@if $top == auto {
|
16
|
-
top: $top;
|
17
|
-
}
|
18
|
-
@else if not(unitless($top)) {
|
17
|
+
@if ($top and $top == auto) or (type-of($top) == number and not unitless($top)) {
|
19
18
|
top: $top;
|
20
19
|
}
|
21
20
|
|
22
|
-
@if $right == auto {
|
23
|
-
right: $right;
|
24
|
-
}
|
25
|
-
@else if not(unitless($right)) {
|
21
|
+
@if ($right and $right == auto) or (type-of($right) == number and not unitless($right)) {
|
26
22
|
right: $right;
|
27
23
|
}
|
28
24
|
|
29
|
-
@if $bottom == auto {
|
30
|
-
bottom: $bottom;
|
31
|
-
}
|
32
|
-
@else if not(unitless($bottom)) {
|
25
|
+
@if ($bottom and $bottom == auto) or (type-of($bottom) == number and not unitless($bottom)) {
|
33
26
|
bottom: $bottom;
|
34
27
|
}
|
35
28
|
|
36
|
-
@if $left == auto {
|
37
|
-
left: $left;
|
38
|
-
}
|
39
|
-
@else if not(unitless($left)) {
|
29
|
+
@if ($left and $left == auto) or (type-of($left) == number and not unitless($left)) {
|
40
30
|
left: $left;
|
41
31
|
}
|
42
32
|
}
|
@@ -1,11 +1,7 @@
|
|
1
1
|
//************************************************************************//
|
2
2
|
// Example: @include prefixer(border-radius, $radii, webkit ms spec);
|
3
3
|
//************************************************************************//
|
4
|
-
|
5
|
-
$prefix-for-mozilla: true !default;
|
6
|
-
$prefix-for-microsoft: true !default;
|
7
|
-
$prefix-for-opera: true !default;
|
8
|
-
$prefix-for-spec: true !default; // required for keyframe mixin
|
4
|
+
// Variables located in /settings/_prefixer.scss
|
9
5
|
|
10
6
|
@mixin prefixer ($property, $value, $prefixes) {
|
11
7
|
@each $prefix in $prefixes {
|
@@ -0,0 +1,33 @@
|
|
1
|
+
@mixin rem($property, $size, $base: $em-base) {
|
2
|
+
@if not unitless($base) {
|
3
|
+
$base: strip-units($base);
|
4
|
+
}
|
5
|
+
|
6
|
+
$unitless_values: ();
|
7
|
+
@each $num in $size {
|
8
|
+
@if not unitless($num) {
|
9
|
+
@if unit($num) == "em" {
|
10
|
+
$num: $num * $base;
|
11
|
+
}
|
12
|
+
|
13
|
+
$num: strip-units($num);
|
14
|
+
}
|
15
|
+
|
16
|
+
$unitless_values: append($unitless_values, $num);
|
17
|
+
}
|
18
|
+
$size: $unitless_values;
|
19
|
+
|
20
|
+
$pixel_values: ();
|
21
|
+
$rem_values: ();
|
22
|
+
@each $value in $pxval {
|
23
|
+
$pixel_value: $value * 1px;
|
24
|
+
$pixel_values: append($pixel_values, $pixel_value);
|
25
|
+
|
26
|
+
$rem_value: ($value / $base) * 1rem;
|
27
|
+
$rem_values: append($rem_values, $rem_value);
|
28
|
+
}
|
29
|
+
|
30
|
+
#{$property}: $pixel_values;
|
31
|
+
#{$property}: $rem_values;
|
32
|
+
}
|
33
|
+
|
@@ -1,19 +1,18 @@
|
|
1
|
-
@mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $asset-pipeline: false) {
|
1
|
+
@mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $retina-suffix: _2x, $asset-pipeline: false) {
|
2
2
|
@if $asset-pipeline {
|
3
3
|
background-image: image-url("#{$filename}.#{$extension}");
|
4
4
|
}
|
5
5
|
@else {
|
6
|
-
background-image:
|
6
|
+
background-image: url("#{$filename}.#{$extension}");
|
7
7
|
}
|
8
8
|
|
9
9
|
@include hidpi {
|
10
|
-
|
11
10
|
@if $asset-pipeline {
|
12
11
|
@if $retina-filename {
|
13
12
|
background-image: image-url("#{$retina-filename}.#{$extension}");
|
14
13
|
}
|
15
14
|
@else {
|
16
|
-
background-image: image-url("#{$filename}
|
15
|
+
background-image: image-url("#{$filename}#{$retina-suffix}.#{$extension}");
|
17
16
|
}
|
18
17
|
}
|
19
18
|
|
@@ -22,7 +21,7 @@
|
|
22
21
|
background-image: url("#{$retina-filename}.#{$extension}");
|
23
22
|
}
|
24
23
|
@else {
|
25
|
-
background-image: url("#{$filename}
|
24
|
+
background-image: url("#{$filename}#{$retina-suffix}.#{$extension}");
|
26
25
|
}
|
27
26
|
}
|
28
27
|
|