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.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/_bourbon.scss +12 -2
  3. data/app/assets/stylesheets/addons/_button.scss +3 -3
  4. data/app/assets/stylesheets/addons/_clearfix.scss +5 -11
  5. data/app/assets/stylesheets/addons/_directional-values.scss +114 -0
  6. data/app/assets/stylesheets/addons/_ellipsis.scss +7 -0
  7. data/app/assets/stylesheets/addons/_font-family.scss +1 -1
  8. data/app/assets/stylesheets/addons/_hide-text.scss +8 -3
  9. data/app/assets/stylesheets/addons/_html5-input-types.scss +57 -3
  10. data/app/assets/stylesheets/addons/_position.scss +6 -16
  11. data/app/assets/stylesheets/addons/_prefixer.scss +1 -5
  12. data/app/assets/stylesheets/addons/_rem.scss +33 -0
  13. data/app/assets/stylesheets/addons/_retina-image.scss +4 -5
  14. data/app/assets/stylesheets/css3/_background.scss +8 -8
  15. data/app/assets/stylesheets/css3/_border-image.scss +1 -0
  16. data/app/assets/stylesheets/css3/_calc.scss +4 -0
  17. data/app/assets/stylesheets/css3/_flex-box.scss +269 -0
  18. data/app/assets/stylesheets/css3/_hyphens.scss +4 -0
  19. data/app/assets/stylesheets/css3/_image-rendering.scss +3 -3
  20. data/app/assets/stylesheets/css3/_keyframes.scss +0 -7
  21. data/app/assets/stylesheets/css3/_linear-gradient.scss +7 -10
  22. data/app/assets/stylesheets/css3/_radial-gradient.scss +6 -11
  23. data/app/assets/stylesheets/css3/_transition.scss +4 -4
  24. data/app/assets/stylesheets/functions/_golden-ratio.scss +3 -0
  25. data/app/assets/stylesheets/functions/_modular-scale.scss +54 -28
  26. data/app/assets/stylesheets/functions/_px-to-em.scss +7 -2
  27. data/app/assets/stylesheets/functions/_radial-gradient.scss +7 -7
  28. data/app/assets/stylesheets/functions/_strip-units.scss +5 -0
  29. data/app/assets/stylesheets/functions/_unpack.scss +17 -0
  30. data/app/assets/stylesheets/helpers/_radial-arg-parser.scss +4 -4
  31. data/app/assets/stylesheets/settings/_prefixer.scss +6 -0
  32. data/app/assets/stylesheets/settings/_px-to-em.scss +1 -0
  33. data/bourbon.gemspec +2 -2
  34. data/bower.json +16 -0
  35. data/dist/_bourbon-deprecated-upcoming.scss +13 -0
  36. data/dist/_bourbon.scss +69 -0
  37. data/dist/addons/_button.scss +273 -0
  38. data/dist/addons/_clearfix.scss +23 -0
  39. data/dist/addons/_directional-values.scss +114 -0
  40. data/dist/addons/_ellipsis.scss +7 -0
  41. data/dist/addons/_font-family.scss +5 -0
  42. data/dist/addons/_hide-text.scss +10 -0
  43. data/dist/addons/_html5-input-types.scss +110 -0
  44. data/dist/addons/_position.scss +32 -0
  45. data/dist/addons/_prefixer.scss +45 -0
  46. data/dist/addons/_rem.scss +33 -0
  47. data/dist/addons/_retina-image.scss +31 -0
  48. data/dist/addons/_size.scss +44 -0
  49. data/dist/addons/_timing-functions.scss +32 -0
  50. data/dist/addons/_triangle.scss +45 -0
  51. data/dist/css3/_animation.scss +52 -0
  52. data/dist/css3/_appearance.scss +3 -0
  53. data/dist/css3/_backface-visibility.scss +6 -0
  54. data/dist/css3/_background-image.scss +48 -0
  55. data/dist/css3/_background.scss +103 -0
  56. data/dist/css3/_border-image.scss +56 -0
  57. data/dist/css3/_border-radius.scss +22 -0
  58. data/dist/css3/_box-sizing.scss +4 -0
  59. data/dist/css3/_calc.scss +4 -0
  60. data/dist/css3/_columns.scss +47 -0
  61. data/dist/css3/_flex-box.scss +321 -0
  62. data/dist/css3/_font-face.scss +23 -0
  63. data/dist/css3/_hidpi-media-query.scss +10 -0
  64. data/dist/css3/_hyphens.scss +4 -0
  65. data/dist/css3/_image-rendering.scss +13 -0
  66. data/dist/css3/_inline-block.scss +8 -0
  67. data/dist/css3/_keyframes.scss +36 -0
  68. data/dist/css3/_linear-gradient.scss +38 -0
  69. data/dist/css3/_perspective.scss +8 -0
  70. data/dist/css3/_placeholder.scss +29 -0
  71. data/dist/css3/_radial-gradient.scss +39 -0
  72. data/dist/css3/_transform.scss +15 -0
  73. data/dist/css3/_transition.scss +34 -0
  74. data/dist/css3/_user-select.scss +3 -0
  75. data/dist/functions/_flex-grid.scss +39 -0
  76. data/dist/functions/_golden-ratio.scss +3 -0
  77. data/dist/functions/_grid-width.scss +13 -0
  78. data/dist/functions/_linear-gradient.scss +13 -0
  79. data/dist/functions/_modular-scale.scss +66 -0
  80. data/dist/functions/_px-to-em.scss +13 -0
  81. data/dist/functions/_radial-gradient.scss +23 -0
  82. data/dist/functions/_strip-units.scss +5 -0
  83. data/dist/functions/_tint-shade.scss +9 -0
  84. data/dist/functions/_transition-property-name.scss +22 -0
  85. data/dist/functions/_unpack.scss +17 -0
  86. data/dist/helpers/_gradient-positions-parser.scss +13 -0
  87. data/dist/helpers/_linear-positions-parser.scss +61 -0
  88. data/dist/helpers/_radial-arg-parser.scss +69 -0
  89. data/dist/helpers/_radial-positions-parser.scss +18 -0
  90. data/dist/helpers/_render-gradients.scss +26 -0
  91. data/dist/helpers/_shape-size-stripper.scss +10 -0
  92. data/dist/settings/_prefixer.scss +6 -0
  93. data/dist/settings/_px-to-em.scss +1 -0
  94. data/lib/bourbon/version.rb +1 -1
  95. data/readme.md +2 -0
  96. metadata +77 -9
  97. data/app/assets/stylesheets/functions/_compact.scss +0 -11
  98. data/app/assets/stylesheets/helpers/_deprecated-webkit-gradient.scss +0 -39
@@ -0,0 +1,23 @@
1
+ // Modern micro clearfix provides an easy way to contain floats without adding additional markup.
2
+ //
3
+ // Example usage:
4
+ //
5
+ // // Contain all floats within .wrapper
6
+ // .wrapper {
7
+ // @include clearfix;
8
+ // .content,
9
+ // .sidebar {
10
+ // float : left;
11
+ // }
12
+ // }
13
+
14
+ @mixin clearfix {
15
+ &:after {
16
+ content:"";
17
+ display:table;
18
+ clear:both;
19
+ }
20
+ }
21
+
22
+ // Acknowledgements
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
+ }
@@ -0,0 +1,7 @@
1
+ @mixin ellipsis($width: 100%) {
2
+ display: inline-block;
3
+ max-width: $width;
4
+ overflow: hidden;
5
+ text-overflow: ellipsis;
6
+ white-space: nowrap;
7
+ }
@@ -0,0 +1,5 @@
1
+ $georgia: Georgia, Cambria, "Times New Roman", Times, serif;
2
+ $helvetica: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
3
+ $lucida-grande: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
4
+ $monospace: "Bitstream Vera Sans Mono", Consolas, Courier, monospace;
5
+ $verdana: Verdana, Geneva, sans-serif;
@@ -0,0 +1,10 @@
1
+ @mixin hide-text {
2
+ overflow: hidden;
3
+
4
+ &:before {
5
+ content: "";
6
+ display: block;
7
+ width: 0;
8
+ height: 100%;
9
+ }
10
+ }
@@ -0,0 +1,110 @@
1
+ //************************************************************************//
2
+ // Generate a variable ($all-text-inputs) with a list of all html5
3
+ // input types that have a text-based input, excluding textarea.
4
+ // http://diveintohtml5.org/forms.html
5
+ //************************************************************************//
6
+ $inputs-list: 'input[type="email"]',
7
+ 'input[type="number"]',
8
+ 'input[type="password"]',
9
+ 'input[type="search"]',
10
+ 'input[type="tel"]',
11
+ 'input[type="text"]',
12
+ 'input[type="url"]',
13
+
14
+ // Webkit & Gecko may change the display of these in the future
15
+ 'input[type="color"]',
16
+ 'input[type="date"]',
17
+ 'input[type="datetime"]',
18
+ 'input[type="datetime-local"]',
19
+ 'input[type="month"]',
20
+ 'input[type="time"]',
21
+ 'input[type="week"]';
22
+
23
+ $unquoted-inputs-list: ();
24
+ @each $input-type in $inputs-list {
25
+ $unquoted-inputs-list: append($unquoted-inputs-list, unquote($input-type), comma) !global;
26
+ }
27
+
28
+ $all-text-inputs: $unquoted-inputs-list;
29
+
30
+
31
+ // Hover Pseudo-class
32
+ //************************************************************************//
33
+ $all-text-inputs-hover: ();
34
+ @each $input-type in $unquoted-inputs-list {
35
+ $input-type-hover: $input-type + ":hover";
36
+ $all-text-inputs-hover: append($all-text-inputs-hover, $input-type-hover, comma) !global;
37
+ }
38
+
39
+ // Focus Pseudo-class
40
+ //************************************************************************//
41
+ $all-text-inputs-focus: ();
42
+ @each $input-type in $unquoted-inputs-list {
43
+ $input-type-focus: $input-type + ":focus";
44
+ $all-text-inputs-focus: append($all-text-inputs-focus, $input-type-focus, comma) !global;
45
+ }
46
+
47
+ // You must use interpolation on the variable:
48
+ // #{$all-text-inputs}
49
+ // #{$all-text-inputs-hover}
50
+ // #{$all-text-inputs-focus}
51
+
52
+ // Example
53
+ //************************************************************************//
54
+ // #{$all-text-inputs}, textarea {
55
+ // border: 1px solid red;
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
+ // }
@@ -0,0 +1,32 @@
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
+ $coordinates: unpack($coordinates);
9
+
10
+ $top: nth($coordinates, 1);
11
+ $right: nth($coordinates, 2);
12
+ $bottom: nth($coordinates, 3);
13
+ $left: nth($coordinates, 4);
14
+
15
+ position: $position;
16
+
17
+ @if ($top and $top == auto) or (type-of($top) == number and not unitless($top)) {
18
+ top: $top;
19
+ }
20
+
21
+ @if ($right and $right == auto) or (type-of($right) == number and not unitless($right)) {
22
+ right: $right;
23
+ }
24
+
25
+ @if ($bottom and $bottom == auto) or (type-of($bottom) == number and not unitless($bottom)) {
26
+ bottom: $bottom;
27
+ }
28
+
29
+ @if ($left and $left == auto) or (type-of($left) == number and not unitless($left)) {
30
+ left: $left;
31
+ }
32
+ }
@@ -0,0 +1,45 @@
1
+ //************************************************************************//
2
+ // Example: @include prefixer(border-radius, $radii, webkit ms spec);
3
+ //************************************************************************//
4
+ // Variables located in /settings/_prefixer.scss
5
+
6
+ @mixin prefixer ($property, $value, $prefixes) {
7
+ @each $prefix in $prefixes {
8
+ @if $prefix == webkit {
9
+ @if $prefix-for-webkit {
10
+ -webkit-#{$property}: $value;
11
+ }
12
+ }
13
+ @else if $prefix == moz {
14
+ @if $prefix-for-mozilla {
15
+ -moz-#{$property}: $value;
16
+ }
17
+ }
18
+ @else if $prefix == ms {
19
+ @if $prefix-for-microsoft {
20
+ -ms-#{$property}: $value;
21
+ }
22
+ }
23
+ @else if $prefix == o {
24
+ @if $prefix-for-opera {
25
+ -o-#{$property}: $value;
26
+ }
27
+ }
28
+ @else if $prefix == spec {
29
+ @if $prefix-for-spec {
30
+ #{$property}: $value;
31
+ }
32
+ }
33
+ @else {
34
+ @warn "Unrecognized prefix: #{$prefix}";
35
+ }
36
+ }
37
+ }
38
+
39
+ @mixin disable-prefix-for-all() {
40
+ $prefix-for-webkit: false;
41
+ $prefix-for-mozilla: false;
42
+ $prefix-for-microsoft: false;
43
+ $prefix-for-opera: false;
44
+ $prefix-for-spec: false;
45
+ }
@@ -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
+
@@ -0,0 +1,31 @@
1
+ @mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $retina-suffix: _2x, $asset-pipeline: false) {
2
+ @if $asset-pipeline {
3
+ background-image: image-url("#{$filename}.#{$extension}");
4
+ }
5
+ @else {
6
+ background-image: url("#{$filename}.#{$extension}");
7
+ }
8
+
9
+ @include hidpi {
10
+ @if $asset-pipeline {
11
+ @if $retina-filename {
12
+ background-image: image-url("#{$retina-filename}.#{$extension}");
13
+ }
14
+ @else {
15
+ background-image: image-url("#{$filename}#{$retina-suffix}.#{$extension}");
16
+ }
17
+ }
18
+
19
+ @else {
20
+ @if $retina-filename {
21
+ background-image: url("#{$retina-filename}.#{$extension}");
22
+ }
23
+ @else {
24
+ background-image: url("#{$filename}#{$retina-suffix}.#{$extension}");
25
+ }
26
+ }
27
+
28
+ background-size: $background-size;
29
+
30
+ }
31
+ }
@@ -0,0 +1,44 @@
1
+ @mixin size($size) {
2
+ @if length($size) == 1 {
3
+ @if $size == auto {
4
+ width: $size;
5
+ height: $size;
6
+ }
7
+
8
+ @else if unitless($size) {
9
+ width: $size + px;
10
+ height: $size + px;
11
+ }
12
+
13
+ @else if not(unitless($size)) {
14
+ width: $size;
15
+ height: $size;
16
+ }
17
+ }
18
+
19
+ // Width x Height
20
+ @if length($size) == 2 {
21
+ $width: nth($size, 1);
22
+ $height: nth($size, 2);
23
+
24
+ @if $width == auto {
25
+ width: $width;
26
+ }
27
+ @else if not(unitless($width)) {
28
+ width: $width;
29
+ }
30
+ @else if unitless($width) {
31
+ width: $width + px;
32
+ }
33
+
34
+ @if $height == auto {
35
+ height: $height;
36
+ }
37
+ @else if not(unitless($height)) {
38
+ height: $height;
39
+ }
40
+ @else if unitless($height) {
41
+ height: $height + px;
42
+ }
43
+ }
44
+ }