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.
Files changed (34) hide show
  1. data/stylesheets/bourbon/_bourbon.scss +12 -2
  2. data/stylesheets/bourbon/addons/_button.scss +3 -3
  3. data/stylesheets/bourbon/addons/_clearfix.scss +5 -11
  4. data/stylesheets/bourbon/addons/_directional-values.scss +114 -0
  5. data/stylesheets/bourbon/addons/_ellipsis.scss +7 -0
  6. data/stylesheets/bourbon/addons/_font-family.scss +1 -1
  7. data/stylesheets/bourbon/addons/_hide-text.scss +8 -3
  8. data/stylesheets/bourbon/addons/_html5-input-types.scss +57 -3
  9. data/stylesheets/bourbon/addons/_position.scss +6 -16
  10. data/stylesheets/bourbon/addons/_prefixer.scss +1 -5
  11. data/stylesheets/bourbon/addons/_rem.scss +33 -0
  12. data/stylesheets/bourbon/addons/_retina-image.scss +4 -5
  13. data/stylesheets/bourbon/css3/_background.scss +8 -8
  14. data/stylesheets/bourbon/css3/_border-image.scss +1 -0
  15. data/stylesheets/bourbon/css3/_calc.scss +4 -0
  16. data/stylesheets/bourbon/css3/_flex-box.scss +269 -0
  17. data/stylesheets/bourbon/css3/_hyphens.scss +4 -0
  18. data/stylesheets/bourbon/css3/_image-rendering.scss +3 -3
  19. data/stylesheets/bourbon/css3/_keyframes.scss +0 -7
  20. data/stylesheets/bourbon/css3/_linear-gradient.scss +7 -10
  21. data/stylesheets/bourbon/css3/_radial-gradient.scss +6 -11
  22. data/stylesheets/bourbon/css3/_transition.scss +4 -4
  23. data/stylesheets/bourbon/functions/_golden-ratio.scss +3 -0
  24. data/stylesheets/bourbon/functions/_modular-scale.scss +54 -28
  25. data/stylesheets/bourbon/functions/_px-to-em.scss +7 -2
  26. data/stylesheets/bourbon/functions/_radial-gradient.scss +7 -7
  27. data/stylesheets/bourbon/functions/_strip-units.scss +5 -0
  28. data/stylesheets/bourbon/functions/_unpack.scss +17 -0
  29. data/stylesheets/bourbon/helpers/_radial-arg-parser.scss +4 -4
  30. data/stylesheets/bourbon/settings/_prefixer.scss +6 -0
  31. data/stylesheets/bourbon/settings/_px-to-em.scss +1 -0
  32. metadata +21 -13
  33. data/stylesheets/bourbon/functions/_compact.scss +0 -11
  34. data/stylesheets/bourbon/helpers/_deprecated-webkit-gradient.scss +0 -39
@@ -1,7 +1,7 @@
1
1
  // Shorthand mixin. Supports multiple parentheses-deliminated values for each variable.
2
- // Example: @include transition (all, 2.0s, ease-in-out);
3
- // @include transition ((opacity, width), (1.0s, 2.0s), ease-in, (0, 2s));
4
- // @include transition ($property:(opacity, width), $delay: (1.5s, 2.5s));
2
+ // Example: @include transition (all 2s ease-in-out);
3
+ // @include transition (opacity 1s ease-in 2s, width 2s ease-out);
4
+ // @include transition-property (transform, opacity);
5
5
 
6
6
  @mixin transition ($properties...) {
7
7
  @if length($properties) >= 1 {
@@ -9,7 +9,7 @@
9
9
  }
10
10
 
11
11
  @else {
12
- $properties: all 0.15s ease-out 0;
12
+ $properties: all 0.15s ease-out 0s;
13
13
  @include prefixer(transition, $properties, webkit moz spec);
14
14
  }
15
15
  }
@@ -0,0 +1,3 @@
1
+ @function golden-ratio($value, $increment) {
2
+ @return modular-scale($value, $increment, $golden)
3
+ }
@@ -1,40 +1,66 @@
1
+ // Scaling Varaibles
2
+ $golden: 1.618;
3
+ $minor-second: 1.067;
4
+ $major-second: 1.125;
5
+ $minor-third: 1.2;
6
+ $major-third: 1.25;
7
+ $perfect-fourth: 1.333;
8
+ $augmented-fourth: 1.414;
9
+ $perfect-fifth: 1.5;
10
+ $minor-sixth: 1.6;
11
+ $major-sixth: 1.667;
12
+ $minor-seventh: 1.778;
13
+ $major-seventh: 1.875;
14
+ $octave: 2;
15
+ $major-tenth: 2.5;
16
+ $major-eleventh: 2.667;
17
+ $major-twelfth: 3;
18
+ $double-octave: 4;
19
+
1
20
  @function modular-scale($value, $increment, $ratio) {
21
+ $v1: nth($value, 1);
22
+ $v2: nth($value, length($value));
23
+ $value: $v1;
24
+
25
+ // scale $v2 to just above $v1
26
+ @while $v2 > $v1 {
27
+ $v2: ($v2 / $ratio); // will be off-by-1
28
+ }
29
+ @while $v2 < $v1 {
30
+ $v2: ($v2 * $ratio); // will fix off-by-1
31
+ }
32
+
33
+ // check AFTER scaling $v2 to prevent double-counting corner-case
34
+ $double-stranded: $v2 > $v1;
35
+
2
36
  @if $increment > 0 {
3
37
  @for $i from 1 through $increment {
4
- $value: ($value * $ratio);
38
+ @if $double-stranded and ($v1 * $ratio) > $v2 {
39
+ $value: $v2;
40
+ $v2: ($v2 * $ratio);
41
+ } @else {
42
+ $v1: ($v1 * $ratio);
43
+ $value: $v1;
44
+ }
5
45
  }
6
46
  }
7
47
 
8
48
  @if $increment < 0 {
9
- $increment: abs($increment);
10
- @for $i from 1 through $increment {
11
- $value: ($value / $ratio);
49
+ // adjust $v2 to just below $v1
50
+ @if $double-stranded {
51
+ $v2: ($v2 / $ratio);
52
+ }
53
+
54
+ @for $i from $increment through -1 {
55
+ @if $double-stranded and ($v1 / $ratio) < $v2 {
56
+ $value: $v2;
57
+ $v2: ($v2 / $ratio);
58
+ } @else {
59
+ $v1: ($v1 / $ratio);
60
+ $value: $v1;
61
+ }
12
62
  }
13
63
  }
14
64
 
15
65
  @return $value;
16
66
  }
17
-
18
- // div {
19
- // Increment Up GR with positive value
20
- // font-size: modular-scale(14px, 1, 1.618); // returns: 22.652px
21
- //
22
- // Increment Down GR with negative value
23
- // font-size: modular-scale(14px, -1, 1.618); // returns: 8.653px
24
- //
25
- // Can be used with ceil(round up) or floor(round down)
26
- // font-size: floor( modular-scale(14px, 1, 1.618) ); // returns: 22px
27
- // font-size: ceil( modular-scale(14px, 1, 1.618) ); // returns: 23px
28
- // }
29
- //
30
- // modularscale.com
31
-
32
- @function golden-ratio($value, $increment) {
33
- @return modular-scale($value, $increment, 1.618)
34
- }
35
-
36
- // div {
37
- // font-size: golden-ratio(14px, 1); // returns: 22.652px
38
- // }
39
- //
40
- // goldenratiocalculator.com
@@ -2,7 +2,12 @@
2
2
  // eg. for a relational value of 12px write em(12) when the parent is 16px
3
3
  // if the parent is another value say 24px write em(12, 24)
4
4
 
5
- @function em($pxval, $base: 16) {
5
+ @function em($pxval, $base: $em-base) {
6
+ @if not unitless($pxval) {
7
+ $pxval: strip-units($pxval);
8
+ }
9
+ @if not unitless($base) {
10
+ $base: strip-units($base);
11
+ }
6
12
  @return ($pxval / $base) * 1em;
7
13
  }
8
-
@@ -1,11 +1,11 @@
1
1
  // This function is required and used by the background-image mixin.
2
2
  @function radial-gradient($G1, $G2,
3
- $G3: false, $G4: false,
4
- $G5: false, $G6: false,
5
- $G7: false, $G8: false,
6
- $G9: false, $G10: false,
7
- $pos: null,
8
- $shape-size: null) {
3
+ $G3: null, $G4: null,
4
+ $G5: null, $G6: null,
5
+ $G7: null, $G8: null,
6
+ $G9: null, $G10: null,
7
+ $pos: null,
8
+ $shape-size: null) {
9
9
 
10
10
  $data: _radial-arg-parser($G1, $G2, $pos, $shape-size);
11
11
  $G1: nth($data, 1);
@@ -14,7 +14,7 @@
14
14
  $shape-size: nth($data, 4);
15
15
 
16
16
  $type: radial;
17
- $gradient: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10);
17
+ $gradient: $G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10;
18
18
 
19
19
  $type-gradient: $type, $shape-size $pos, $gradient;
20
20
  @return $type-gradient;
@@ -0,0 +1,5 @@
1
+ // Srtips the units from a value. e.g. 12px -> 12
2
+
3
+ @function strip-units($val) {
4
+ @return ($val / ($val * 0 + 1));
5
+ }
@@ -0,0 +1,17 @@
1
+ // Convert shorthand to the 4-value syntax
2
+
3
+ @function unpack($shorthand) {
4
+ @if length($shorthand) == 1 {
5
+ @return nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1);
6
+ }
7
+ @else if length($shorthand) == 2 {
8
+ @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 1) nth($shorthand, 2);
9
+ }
10
+ @else if length($shorthand) == 3 {
11
+ @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 3) nth($shorthand, 2);
12
+ }
13
+ @else {
14
+ @return $shorthand;
15
+ }
16
+ }
17
+
@@ -22,7 +22,7 @@
22
22
  $pos: $pos nth($value, $i);
23
23
  }
24
24
  }
25
- $G1: false;
25
+ $G1: null;
26
26
  }
27
27
 
28
28
  // If not spec calculate correct values
@@ -38,7 +38,7 @@
38
38
  $pos: $value;
39
39
 
40
40
  @if $pos == $G1 {
41
- $G1: false;
41
+ $G1: null;
42
42
  }
43
43
  }
44
44
 
@@ -55,11 +55,11 @@
55
55
  $shape-size: $value;
56
56
 
57
57
  @if $value == $G1 {
58
- $G1: false;
58
+ $G1: null;
59
59
  }
60
60
 
61
61
  @else if $value == $G2 {
62
- $G2: false;
62
+ $G2: null;
63
63
  }
64
64
  }
65
65
  }
@@ -0,0 +1,6 @@
1
+ // Variable settings for /addons/prefixer.scss
2
+ $prefix-for-webkit: true !default;
3
+ $prefix-for-mozilla: true !default;
4
+ $prefix-for-microsoft: true !default;
5
+ $prefix-for-opera: true !default;
6
+ $prefix-for-spec: true !default; // required for keyframe mixin
@@ -0,0 +1 @@
1
+ $em-base: 16px !default;
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bourbon-compass
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.8
5
- prerelease:
4
+ version: 3.2.0.beta.1.a
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jed Foster
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-11 00:00:00.000000000 Z
12
+ date: 2013-11-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: compass
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: '0.11'
21
+ version: 0.13.alpha.10
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
- version: '0.11'
29
+ version: 0.13.alpha.10
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: sass
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ! '>='
36
36
  - !ruby/object:Gem::Version
37
- version: 3.2.0
37
+ version: 3.3.0.rc.1
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,8 +42,8 @@ dependencies:
42
42
  requirements:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
- version: 3.2.0
46
- description: ThoughtBot's Bourbon packaged as a Compass extension.
45
+ version: 3.3.0.rc.1
46
+ description: thoughtbot's Bourbon packaged as a Compass extension.
47
47
  email: jed@jedfoster.com
48
48
  executables: []
49
49
  extensions: []
@@ -54,11 +54,14 @@ files:
54
54
  - stylesheets/bourbon/_bourbon.scss
55
55
  - stylesheets/bourbon/addons/_button.scss
56
56
  - stylesheets/bourbon/addons/_clearfix.scss
57
+ - stylesheets/bourbon/addons/_directional-values.scss
58
+ - stylesheets/bourbon/addons/_ellipsis.scss
57
59
  - stylesheets/bourbon/addons/_font-family.scss
58
60
  - stylesheets/bourbon/addons/_hide-text.scss
59
61
  - stylesheets/bourbon/addons/_html5-input-types.scss
60
62
  - stylesheets/bourbon/addons/_position.scss
61
63
  - stylesheets/bourbon/addons/_prefixer.scss
64
+ - stylesheets/bourbon/addons/_rem.scss
62
65
  - stylesheets/bourbon/addons/_retina-image.scss
63
66
  - stylesheets/bourbon/addons/_size.scss
64
67
  - stylesheets/bourbon/addons/_timing-functions.scss
@@ -71,10 +74,12 @@ files:
71
74
  - stylesheets/bourbon/css3/_border-image.scss
72
75
  - stylesheets/bourbon/css3/_border-radius.scss
73
76
  - stylesheets/bourbon/css3/_box-sizing.scss
77
+ - stylesheets/bourbon/css3/_calc.scss
74
78
  - stylesheets/bourbon/css3/_columns.scss
75
79
  - stylesheets/bourbon/css3/_flex-box.scss
76
80
  - stylesheets/bourbon/css3/_font-face.scss
77
81
  - stylesheets/bourbon/css3/_hidpi-media-query.scss
82
+ - stylesheets/bourbon/css3/_hyphens.scss
78
83
  - stylesheets/bourbon/css3/_image-rendering.scss
79
84
  - stylesheets/bourbon/css3/_inline-block.scss
80
85
  - stylesheets/bourbon/css3/_keyframes.scss
@@ -85,22 +90,25 @@ files:
85
90
  - stylesheets/bourbon/css3/_transform.scss
86
91
  - stylesheets/bourbon/css3/_transition.scss
87
92
  - stylesheets/bourbon/css3/_user-select.scss
88
- - stylesheets/bourbon/functions/_compact.scss
89
93
  - stylesheets/bourbon/functions/_flex-grid.scss
94
+ - stylesheets/bourbon/functions/_golden-ratio.scss
90
95
  - stylesheets/bourbon/functions/_grid-width.scss
91
96
  - stylesheets/bourbon/functions/_linear-gradient.scss
92
97
  - stylesheets/bourbon/functions/_modular-scale.scss
93
98
  - stylesheets/bourbon/functions/_px-to-em.scss
94
99
  - stylesheets/bourbon/functions/_radial-gradient.scss
100
+ - stylesheets/bourbon/functions/_strip-units.scss
95
101
  - stylesheets/bourbon/functions/_tint-shade.scss
96
102
  - stylesheets/bourbon/functions/_transition-property-name.scss
97
- - stylesheets/bourbon/helpers/_deprecated-webkit-gradient.scss
103
+ - stylesheets/bourbon/functions/_unpack.scss
98
104
  - stylesheets/bourbon/helpers/_gradient-positions-parser.scss
99
105
  - stylesheets/bourbon/helpers/_linear-positions-parser.scss
100
106
  - stylesheets/bourbon/helpers/_radial-arg-parser.scss
101
107
  - stylesheets/bourbon/helpers/_radial-positions-parser.scss
102
108
  - stylesheets/bourbon/helpers/_render-gradients.scss
103
109
  - stylesheets/bourbon/helpers/_shape-size-stripper.scss
110
+ - stylesheets/bourbon/settings/_prefixer.scss
111
+ - stylesheets/bourbon/settings/_px-to-em.scss
104
112
  homepage: https://github.com/jedfoster/bourbon-compass
105
113
  licenses: []
106
114
  post_install_message:
@@ -116,13 +124,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
124
  required_rubygems_version: !ruby/object:Gem::Requirement
117
125
  none: false
118
126
  requirements:
119
- - - ! '>='
127
+ - - ! '>'
120
128
  - !ruby/object:Gem::Version
121
- version: '0'
129
+ version: 1.3.1
122
130
  requirements: []
123
131
  rubyforge_project:
124
132
  rubygems_version: 1.8.23
125
133
  signing_key:
126
134
  specification_version: 3
127
- summary: ThoughtBot's Bourbon packaged as a Compass extension.
135
+ summary: thoughtbot's Bourbon packaged as a Compass extension.
128
136
  test_files: []
@@ -1,11 +0,0 @@
1
- // Remove `false` values from a list
2
-
3
- @function compact($vars...) {
4
- $list: ();
5
- @each $var in $vars {
6
- @if $var {
7
- $list: append($list, $var, comma);
8
- }
9
- }
10
- @return $list;
11
- }
@@ -1,39 +0,0 @@
1
- // Render Deprecated Webkit Gradient - Linear || Radial
2
- //************************************************************************//
3
- @function _deprecated-webkit-gradient($type,
4
- $deprecated-pos1, $deprecated-pos2,
5
- $full,
6
- $deprecated-radius1: false, $deprecated-radius2: false) {
7
- $gradient-list: ();
8
- $gradient: false;
9
- $full-length: length($full);
10
- $percentage: false;
11
- $gradient-type: $type;
12
-
13
- @for $i from 1 through $full-length {
14
- $gradient: nth($full, $i);
15
-
16
- @if length($gradient) == 2 {
17
- $color-stop: color-stop(nth($gradient, 2), nth($gradient, 1));
18
- $gradient-list: join($gradient-list, $color-stop, comma);
19
- }
20
- @else if $gradient != null {
21
- @if $i == $full-length {
22
- $percentage: 100%;
23
- }
24
- @else {
25
- $percentage: ($i - 1) * (100 / ($full-length - 1)) + "%";
26
- }
27
- $color-stop: color-stop(unquote($percentage), $gradient);
28
- $gradient-list: join($gradient-list, $color-stop, comma);
29
- }
30
- }
31
-
32
- @if $type == radial {
33
- $gradient: -webkit-gradient(radial, $deprecated-pos1, $deprecated-radius1, $deprecated-pos2, $deprecated-radius2, $gradient-list);
34
- }
35
- @else if $type == linear {
36
- $gradient: -webkit-gradient(linear, $deprecated-pos1, $deprecated-pos2, $gradient-list);
37
- }
38
- @return $gradient;
39
- }