bourbon 3.2.4 → 4.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +6 -6
  3. data/.npmignore +9 -11
  4. data/Gemfile.lock +49 -0
  5. data/{LICENSE.md → LICENSE} +10 -8
  6. data/app/assets/stylesheets/_bourbon-deprecated-upcoming.scss +3 -8
  7. data/app/assets/stylesheets/_bourbon.scss +9 -12
  8. data/app/assets/stylesheets/addons/_directional-values.scss +8 -5
  9. data/app/assets/stylesheets/addons/_html5-input-types.scss +15 -39
  10. data/app/assets/stylesheets/addons/_position.scss +5 -5
  11. data/app/assets/stylesheets/addons/_prefixer.scss +5 -5
  12. data/app/assets/stylesheets/addons/_rem.scss +33 -0
  13. data/app/assets/stylesheets/addons/_retina-image.scss +1 -1
  14. data/app/assets/stylesheets/addons/_size.scss +9 -37
  15. data/app/assets/stylesheets/addons/_timing-functions.scss +1 -1
  16. data/app/assets/stylesheets/addons/_triangle.scss +0 -1
  17. data/app/assets/stylesheets/css3/_background-image.scss +29 -35
  18. data/app/assets/stylesheets/css3/_background.scss +37 -85
  19. data/app/assets/stylesheets/css3/_border-image.scss +45 -42
  20. data/app/assets/stylesheets/css3/_flex-box.scss +14 -14
  21. data/app/assets/stylesheets/css3/_font-face.scss +1 -1
  22. data/app/assets/stylesheets/css3/_keyframes.scss +7 -7
  23. data/app/assets/stylesheets/functions/_assign.scss +11 -0
  24. data/app/assets/stylesheets/functions/_color-lightness.scss +5 -5
  25. data/app/assets/stylesheets/helpers/_convert-units.scss +15 -0
  26. data/app/assets/stylesheets/helpers/_is-num.scss +8 -0
  27. data/app/assets/stylesheets/helpers/_linear-angle-parser.scss +25 -0
  28. data/app/assets/stylesheets/helpers/_linear-gradient-parser.scss +41 -0
  29. data/app/assets/stylesheets/helpers/_linear-side-corner-parser.scss +31 -0
  30. data/app/assets/stylesheets/helpers/_radial-gradient-parser.scss +50 -0
  31. data/app/assets/stylesheets/helpers/_render-gradients.scss +2 -2
  32. data/app/assets/stylesheets/helpers/_str-to-num.scss +50 -0
  33. data/bourbon.gemspec +2 -2
  34. data/bower.json +6 -23
  35. data/dist/_bourbon-deprecated-upcoming.scss +3 -8
  36. data/dist/_bourbon.scss +9 -12
  37. data/dist/addons/_directional-values.scss +8 -5
  38. data/dist/addons/_html5-input-types.scss +15 -39
  39. data/dist/addons/_position.scss +5 -5
  40. data/dist/addons/_prefixer.scss +5 -5
  41. data/dist/addons/_rem.scss +33 -0
  42. data/dist/addons/_retina-image.scss +1 -1
  43. data/dist/addons/_size.scss +9 -37
  44. data/dist/addons/_timing-functions.scss +1 -1
  45. data/dist/addons/_triangle.scss +0 -1
  46. data/dist/css3/_background-image.scss +29 -35
  47. data/dist/css3/_background.scss +37 -85
  48. data/dist/css3/_border-image.scss +45 -42
  49. data/dist/css3/_flex-box.scss +14 -14
  50. data/dist/css3/_font-face.scss +1 -1
  51. data/dist/css3/_keyframes.scss +7 -7
  52. data/dist/functions/_assign.scss +11 -0
  53. data/dist/functions/_color-lightness.scss +5 -5
  54. data/dist/helpers/_convert-units.scss +15 -0
  55. data/dist/helpers/_is-num.scss +8 -0
  56. data/dist/helpers/_linear-angle-parser.scss +25 -0
  57. data/dist/helpers/_linear-gradient-parser.scss +41 -0
  58. data/dist/helpers/_linear-side-corner-parser.scss +31 -0
  59. data/dist/helpers/_radial-gradient-parser.scss +50 -0
  60. data/dist/helpers/_render-gradients.scss +2 -2
  61. data/dist/helpers/_str-to-num.scss +50 -0
  62. data/lib/bourbon/version.rb +1 -1
  63. data/package.json +14 -18
  64. data/readme.md +96 -0
  65. metadata +38 -33
  66. data/README.md +0 -126
  67. data/app/assets/stylesheets/addons/_word-wrap.scss +0 -8
  68. data/app/assets/stylesheets/css3/_inline-block.scss +0 -8
  69. data/app/assets/stylesheets/functions/_linear-gradient.scss +0 -13
  70. data/app/assets/stylesheets/functions/_px-to-rem.scss +0 -15
  71. data/app/assets/stylesheets/functions/_radial-gradient.scss +0 -23
  72. data/app/assets/stylesheets/settings/_asset-pipeline.scss +0 -1
  73. data/dist/addons/_word-wrap.scss +0 -8
  74. data/dist/css3/_inline-block.scss +0 -8
  75. data/dist/functions/_linear-gradient.scss +0 -13
  76. data/dist/functions/_px-to-rem.scss +0 -15
  77. data/dist/functions/_radial-gradient.scss +0 -23
  78. data/dist/settings/_asset-pipeline.scss +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88f0d743725b79399da61063778c2f1ba0e4a2e8
4
- data.tar.gz: 8de36252f02ecb58d8682a2e5ab2e7a5283b1eac
3
+ metadata.gz: c35402f56d5005b99f011972d15317ea8196b4bc
4
+ data.tar.gz: da552ec66bc668f0083df80676f66fb91a27a937
5
5
  SHA512:
6
- metadata.gz: cd89c5677e8d2d52696350f850b6227b2b9753a422a34aa6489dee3dc70afe884afbe49ddf623445a6b2d838147d778e491e3a8260bc0859bd8fd286b2af2b29
7
- data.tar.gz: 8377579580cd2fd475fc3bc9f8e43977779debd69e39b35fe72d9a92527d2d27b41720c224e6dacbc6625a2978bffdf5351f39b649ebc52a038981bd6f5a326b
6
+ metadata.gz: ecd2ca09115c189da37b6b4601922da210ea174757f19ed521abd4a57e67fad80523bd34f080bf0a2db2b31e66254cf8c63e5e9c574b7661844f7cdcd8e6041c
7
+ data.tar.gz: e892f06ca1b0be6e7e73a0e138dcabe5a6ccbbbcffc4a7663970b6dd666fb610c026c489512c93cf1f62ca12c19fd8956733fcf9507c7a8560ac2b3f770a6c00
data/.gitignore CHANGED
@@ -1,7 +1,7 @@
1
- _site
2
- .DS_store
3
- .sass-cache
4
- *gem
5
1
  *swp
6
- Gemfile.lock
7
- tmp
2
+ *gem
3
+ .sass-cache/
4
+ /bourbon/
5
+ demo/
6
+ tmp/
7
+ tags
data/.npmignore CHANGED
@@ -1,11 +1,9 @@
1
- .gitignore
2
- app/
3
- bin/
4
- bourbon.gemspec
5
- bower.json
6
- features/
7
- LICENSE.md
8
- lib/
9
- Gemfile
10
- Gemfile.lock
11
- Rakefile
1
+ app/
2
+ bin/
3
+ features/
4
+ lib/
5
+ bower.json
6
+ bourbon.gemspec
7
+ Rakefile
8
+ Gemfile.lock
9
+ Gemfile
@@ -0,0 +1,49 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ bourbon (4.0.0.rc1)
5
+ sass (>= 3.3.0.rc.2)
6
+ thor
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ aruba (0.4.11)
12
+ childprocess (>= 0.2.3)
13
+ cucumber (>= 1.1.1)
14
+ ffi (>= 1.0.11)
15
+ rspec (>= 2.7.0)
16
+ builder (3.0.0)
17
+ childprocess (0.3.1)
18
+ ffi (~> 1.0.6)
19
+ cucumber (1.1.9)
20
+ builder (>= 2.1.2)
21
+ diff-lcs (>= 1.1.2)
22
+ gherkin (~> 2.9.0)
23
+ json (>= 1.4.6)
24
+ term-ansicolor (>= 1.0.6)
25
+ diff-lcs (1.1.3)
26
+ ffi (1.0.11)
27
+ gherkin (2.9.0)
28
+ json (>= 1.4.6)
29
+ json (1.6.5)
30
+ rake (0.9.2.2)
31
+ rspec (2.8.0)
32
+ rspec-core (~> 2.8.0)
33
+ rspec-expectations (~> 2.8.0)
34
+ rspec-mocks (~> 2.8.0)
35
+ rspec-core (2.8.0)
36
+ rspec-expectations (2.8.0)
37
+ diff-lcs (~> 1.1.2)
38
+ rspec-mocks (2.8.0)
39
+ sass (3.3.3)
40
+ term-ansicolor (1.0.7)
41
+ thor (0.18.1)
42
+
43
+ PLATFORMS
44
+ ruby
45
+
46
+ DEPENDENCIES
47
+ aruba (~> 0.4)
48
+ bourbon!
49
+ rake
@@ -1,21 +1,23 @@
1
- The MIT License (MIT)
1
+ LICENSE
2
2
 
3
- Copyright © 2011–2015 [thoughtbot, inc.](http://thoughtbot.com)
3
+ The MIT License
4
+
5
+ Copyright (c) 2011-2013 thoughtbot, inc.
4
6
 
5
7
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the Software), to deal
8
+ of this software and associated documentation files (the "Software"), to deal
7
9
  in the Software without restriction, including without limitation the rights
8
10
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
11
  copies of the Software, and to permit persons to whom the Software is
10
12
  furnished to do so, subject to the following conditions:
11
13
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
+ The above copyright notice and this permission notice shall be included in
15
+ all copies or substantial portions of the Software.
14
16
 
15
- THE SOFTWARE IS PROVIDED AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
18
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
19
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
20
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
21
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ THE SOFTWARE.
@@ -2,12 +2,7 @@
2
2
  // These mixins/functions are deprecated
3
3
  // They will be removed in the next MAJOR version release
4
4
  //************************************************************************//
5
- @mixin box-shadow ($shadows...) {
6
- @include prefixer(box-shadow, $shadows, spec);
7
- @warn "box-shadow is deprecated and will be removed in the next major version release";
8
- }
9
-
10
- @mixin background-size ($lengths...) {
11
- @include prefixer(background-size, $lengths, spec);
12
- @warn "background-size is deprecated and will be removed in the next major version release";
5
+ @mixin inline-block {
6
+ display: inline-block;
7
+ @warn "inline-block mixin is deprecated and will be removed in the next major version release";
13
8
  }
@@ -1,31 +1,30 @@
1
- // Bourbon 3.2.4
2
- // http://bourbon.io
3
- // Copyright 2011-2015 thoughtbot, inc.
4
- // MIT License
5
-
6
1
  // Settings
7
2
  @import "settings/prefixer";
8
3
  @import "settings/px-to-em";
9
- @import "settings/asset-pipeline";
10
4
 
11
5
  // Custom Helpers
6
+ @import "helpers/convert-units";
12
7
  @import "helpers/gradient-positions-parser";
8
+ @import "helpers/is-num";
9
+ @import "helpers/linear-angle-parser";
10
+ @import "helpers/linear-gradient-parser";
13
11
  @import "helpers/linear-positions-parser";
12
+ @import "helpers/linear-side-corner-parser";
14
13
  @import "helpers/radial-arg-parser";
15
14
  @import "helpers/radial-positions-parser";
15
+ @import "helpers/radial-gradient-parser";
16
16
  @import "helpers/render-gradients";
17
17
  @import "helpers/shape-size-stripper";
18
+ @import "helpers/str-to-num";
18
19
 
19
20
  // Custom Functions
21
+ @import "functions/assign";
20
22
  @import "functions/color-lightness";
21
23
  @import "functions/flex-grid";
22
24
  @import "functions/golden-ratio";
23
25
  @import "functions/grid-width";
24
- @import "functions/linear-gradient";
25
26
  @import "functions/modular-scale";
26
27
  @import "functions/px-to-em";
27
- @import "functions/px-to-rem";
28
- @import "functions/radial-gradient";
29
28
  @import "functions/strip-units";
30
29
  @import "functions/tint-shade";
31
30
  @import "functions/transition-property-name";
@@ -45,11 +44,9 @@
45
44
  @import "css3/filter";
46
45
  @import "css3/flex-box";
47
46
  @import "css3/font-face";
48
- @import "css3/font-feature-settings";
49
47
  @import "css3/hyphens";
50
48
  @import "css3/hidpi-media-query";
51
49
  @import "css3/image-rendering";
52
- @import "css3/inline-block";
53
50
  @import "css3/keyframes";
54
51
  @import "css3/linear-gradient";
55
52
  @import "css3/perspective";
@@ -69,11 +66,11 @@
69
66
  @import "addons/html5-input-types";
70
67
  @import "addons/position";
71
68
  @import "addons/prefixer";
69
+ @import "addons/rem";
72
70
  @import "addons/retina-image";
73
71
  @import "addons/size";
74
72
  @import "addons/timing-functions";
75
73
  @import "addons/triangle";
76
- @import "addons/word-wrap";
77
74
 
78
75
  // Soon to be deprecated Mixins
79
76
  @import "bourbon-deprecated-upcoming";
@@ -57,6 +57,9 @@
57
57
  $right: $pre + "-right" + if($suf, "-#{$suf}", "");
58
58
  $all: $pre + if($suf, "-#{$suf}", "");
59
59
 
60
+ // Get list inside $vals (is there a better way?)
61
+ @each $val in $vals { $vals: $val; }
62
+
60
63
  $vals: collapse-directionals($vals);
61
64
 
62
65
  @if contains-falsy($vals) {
@@ -91,21 +94,21 @@
91
94
  }
92
95
 
93
96
  @mixin margin($vals...) {
94
- @include directional-property(margin, false, $vals...);
97
+ @include directional-property(margin, false, $vals);
95
98
  }
96
99
 
97
100
  @mixin padding($vals...) {
98
- @include directional-property(padding, false, $vals...);
101
+ @include directional-property(padding, false, $vals);
99
102
  }
100
103
 
101
104
  @mixin border-style($vals...) {
102
- @include directional-property(border, style, $vals...);
105
+ @include directional-property(border, style, $vals);
103
106
  }
104
107
 
105
108
  @mixin border-color($vals...) {
106
- @include directional-property(border, color, $vals...);
109
+ @include directional-property(border, color, $vals);
107
110
  }
108
111
 
109
112
  @mixin border-width($vals...) {
110
- @include directional-property(border, width, $vals...);
113
+ @include directional-property(border, width, $vals);
111
114
  }
@@ -20,29 +20,19 @@ $inputs-list: 'input[type="email"]',
20
20
  'input[type="time"]',
21
21
  'input[type="week"]';
22
22
 
23
- $unquoted-inputs-list: ();
24
- @each $input-type in $inputs-list {
25
- $unquoted-inputs-list: append($unquoted-inputs-list, unquote($input-type), comma);
26
- }
27
-
28
- $all-text-inputs: $unquoted-inputs-list;
29
-
23
+ // Bare inputs
24
+ //************************************************************************//
25
+ $all-text-inputs: assign-inputs($inputs-list);
30
26
 
31
27
  // Hover Pseudo-class
32
28
  //************************************************************************//
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);
37
- }
29
+ $all-text-inputs-hover: assign-inputs($inputs-list, hover);
38
30
 
39
31
  // Focus Pseudo-class
40
32
  //************************************************************************//
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);
45
- }
33
+ $all-text-inputs-focus: assign-inputs($inputs-list, focus);
34
+
35
+
46
36
 
47
37
  // You must use interpolation on the variable:
48
38
  // #{$all-text-inputs}
@@ -65,37 +55,23 @@ $inputs-button-list: 'input[type="button"]',
65
55
  'input[type="reset"]',
66
56
  'input[type="submit"]';
67
57
 
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
-
58
+ // Bare inputs
59
+ //************************************************************************//
60
+ $all-button-inputs: assign-inputs($inputs-button-list);
75
61
 
76
62
  // Hover Pseudo-class
77
63
  //************************************************************************//
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
- }
64
+ $all-button-inputs-hover: assign-inputs($inputs-button-list, hover);
83
65
 
84
66
  // Focus Pseudo-class
85
67
  //************************************************************************//
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
- }
68
+ $all-button-inputs-focus: assign-inputs($inputs-button-list, focus);
91
69
 
92
70
  // Active Pseudo-class
93
71
  //************************************************************************//
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
- }
72
+ $all-button-inputs-active: assign-inputs($inputs-button-list, active);
73
+
74
+
99
75
 
100
76
  // You must use interpolation on the variable:
101
77
  // #{$all-button-inputs}
@@ -1,4 +1,4 @@
1
- @mixin position ($position: relative, $coordinates: 0 0 0 0) {
1
+ @mixin position ($position: relative, $coordinates: null null null null) {
2
2
 
3
3
  @if type-of($position) == list {
4
4
  $coordinates: $position;
@@ -14,19 +14,19 @@
14
14
 
15
15
  position: $position;
16
16
 
17
- @if ($top and $top == auto) or (type-of($top) == number and not(unitless($top))) {
17
+ @if ($top and $top == auto) or (type-of($top) == number) {
18
18
  top: $top;
19
19
  }
20
20
 
21
- @if ($right and $right == auto) or (type-of($right) == number and not(unitless($right))) {
21
+ @if ($right and $right == auto) or (type-of($right) == number) {
22
22
  right: $right;
23
23
  }
24
24
 
25
- @if ($bottom and $bottom == auto) or (type-of($bottom) == number and not(unitless($bottom))) {
25
+ @if ($bottom and $bottom == auto) or (type-of($bottom) == number) {
26
26
  bottom: $bottom;
27
27
  }
28
28
 
29
- @if ($left and $left == auto) or (type-of($left) == number and not(unitless($left))) {
29
+ @if ($left and $left == auto) or (type-of($left) == number) {
30
30
  left: $left;
31
31
  }
32
32
  }
@@ -37,9 +37,9 @@
37
37
  }
38
38
 
39
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;
40
+ $prefix-for-webkit: false !global;
41
+ $prefix-for-mozilla: false !global;
42
+ $prefix-for-microsoft: false !global;
43
+ $prefix-for-opera: false !global;
44
+ $prefix-for-spec: false !global;
45
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 $size {
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,4 +1,4 @@
1
- @mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $retina-suffix: _2x, $asset-pipeline: $asset-pipeline) {
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
  }
@@ -1,44 +1,16 @@
1
1
  @mixin size($size) {
2
- @if length($size) == 1 {
3
- @if $size == auto {
4
- width: $size;
5
- height: $size;
6
- }
2
+ $height: nth($size, 1);
3
+ $width: $height;
7
4
 
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);
5
+ @if length($size) > 1 {
22
6
  $height: nth($size, 2);
7
+ }
23
8
 
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
- }
9
+ @if $height == auto or (type-of($height) == number and not unitless($height)) {
10
+ height: $height;
11
+ }
33
12
 
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
- }
13
+ @if $width == auto or (type-of($height) == number and not unitless($width)) {
14
+ width: $width;
43
15
  }
44
16
  }