bourbon 4.3.4 → 5.0.0.alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/.npmignore +1 -0
  4. data/.scss-lint.yml +2 -143
  5. data/.travis.yml +8 -0
  6. data/LICENSE.md +1 -1
  7. data/README.md +5 -19
  8. data/bourbon.gemspec +2 -2
  9. data/bower.json +7 -6
  10. data/core/_bourbon.scss +47 -0
  11. data/core/bourbon/_bourbon-deprecated.scss +1 -0
  12. data/core/bourbon/addons/_border-color.scss +26 -0
  13. data/{app/assets/stylesheets → core/bourbon}/addons/_border-radius.scss +19 -18
  14. data/core/bourbon/addons/_border-style.scss +25 -0
  15. data/core/bourbon/addons/_border-width.scss +25 -0
  16. data/core/bourbon/addons/_buttons.scss +61 -0
  17. data/core/bourbon/addons/_clearfix.scss +25 -0
  18. data/core/bourbon/addons/_ellipsis.scss +30 -0
  19. data/core/bourbon/addons/_font-stacks.scss +19 -0
  20. data/core/bourbon/addons/_hide-text.scss +23 -0
  21. data/core/bourbon/addons/_margin.scss +26 -0
  22. data/core/bourbon/addons/_padding.scss +26 -0
  23. data/core/bourbon/addons/_position.scss +49 -0
  24. data/core/bourbon/addons/_prefixer.scss +33 -0
  25. data/core/bourbon/addons/_size.scss +43 -0
  26. data/core/bourbon/addons/_text-inputs.scss +123 -0
  27. data/{app/assets/stylesheets → core/bourbon}/addons/_timing-functions.scss +7 -3
  28. data/core/bourbon/addons/_word-wrap.scss +29 -0
  29. data/core/bourbon/css3/_font-face.scss +50 -0
  30. data/core/bourbon/functions/_assign-inputs.scss +25 -0
  31. data/core/bourbon/functions/_contains-falsy.scss +20 -0
  32. data/core/bourbon/functions/_contains.scss +23 -0
  33. data/{app/assets/stylesheets → core/bourbon}/functions/_is-length.scss +3 -6
  34. data/{app/assets/stylesheets → core/bourbon}/functions/_is-light.scss +5 -10
  35. data/{app/assets/stylesheets → core/bourbon}/functions/_is-number.scss +3 -6
  36. data/core/bourbon/functions/_is-size.scss +16 -0
  37. data/core/bourbon/functions/_modular-scale.scss +101 -0
  38. data/core/bourbon/functions/_shade.scss +24 -0
  39. data/core/bourbon/functions/_strip-unit.scss +17 -0
  40. data/core/bourbon/functions/_tint.scss +24 -0
  41. data/{app/assets/stylesheets → core/bourbon}/functions/_unpack.scss +11 -14
  42. data/{app/assets/stylesheets → core/bourbon}/helpers/_directional-values.scss +26 -36
  43. data/{app/assets/stylesheets → core/bourbon}/helpers/_font-source-declaration.scss +0 -10
  44. data/{app/assets/stylesheets → core/bourbon}/settings/_asset-pipeline.scss +1 -1
  45. data/core/bourbon/settings/_global-font-file-formats.scss +12 -0
  46. data/core/bourbon/settings/_modular-scale.scss +17 -0
  47. data/core/bourbon/settings/_scales.scss +27 -0
  48. data/features/step_definitions/bourbon_steps.rb +1 -1
  49. data/index.js +1 -1
  50. data/lib/bourbon/engine.rb +1 -1
  51. data/lib/bourbon/generator.rb +1 -1
  52. data/lib/bourbon/version.rb +1 -1
  53. data/package.json +1 -6
  54. data/spec/bourbon/addons/buttons_spec.rb +3 -3
  55. data/spec/bourbon/addons/font_stacks_spec.rb +21 -11
  56. data/spec/bourbon/addons/text_inputs_spec.rb +14 -14
  57. data/spec/bourbon/css3/font_face_spec_1.rb +18 -0
  58. data/spec/bourbon/css3/font_face_spec_2.rb +19 -0
  59. data/spec/bourbon/css3/font_face_spec_3.rb +18 -0
  60. data/spec/bourbon/css3/font_face_spec_4.rb +19 -0
  61. data/spec/bourbon/functions/assign_inputs_spec.rb +3 -3
  62. data/spec/bourbon/functions/{strip_units_spec.rb → strip_unit_spec.rb} +2 -2
  63. data/spec/fixtures/_setup.scss +1 -1
  64. data/spec/fixtures/addons/font-stacks.scss +24 -8
  65. data/spec/fixtures/addons/size.scss +2 -2
  66. data/spec/fixtures/css3/font-face-1.scss +3 -0
  67. data/spec/fixtures/css3/font-face-2.scss +3 -0
  68. data/spec/fixtures/css3/font-face-3.scss +3 -0
  69. data/spec/fixtures/css3/font-face-4.scss +3 -0
  70. data/spec/fixtures/functions/assign-inputs.scss +1 -1
  71. data/spec/fixtures/functions/strip-unit.scss +17 -0
  72. metadata +72 -129
  73. data/CHANGELOG.md +0 -47
  74. data/app/assets/stylesheets/_bourbon-deprecate.scss +0 -19
  75. data/app/assets/stylesheets/_bourbon-deprecated-upcoming.scss +0 -425
  76. data/app/assets/stylesheets/_bourbon.scss +0 -90
  77. data/app/assets/stylesheets/addons/_border-color.scss +0 -29
  78. data/app/assets/stylesheets/addons/_border-style.scss +0 -28
  79. data/app/assets/stylesheets/addons/_border-width.scss +0 -28
  80. data/app/assets/stylesheets/addons/_buttons.scss +0 -69
  81. data/app/assets/stylesheets/addons/_clearfix.scss +0 -25
  82. data/app/assets/stylesheets/addons/_ellipsis.scss +0 -30
  83. data/app/assets/stylesheets/addons/_font-stacks.scss +0 -31
  84. data/app/assets/stylesheets/addons/_hide-text.scss +0 -27
  85. data/app/assets/stylesheets/addons/_margin.scss +0 -29
  86. data/app/assets/stylesheets/addons/_padding.scss +0 -29
  87. data/app/assets/stylesheets/addons/_position.scss +0 -51
  88. data/app/assets/stylesheets/addons/_prefixer.scss +0 -66
  89. data/app/assets/stylesheets/addons/_retina-image.scss +0 -27
  90. data/app/assets/stylesheets/addons/_size.scss +0 -56
  91. data/app/assets/stylesheets/addons/_text-inputs.scss +0 -118
  92. data/app/assets/stylesheets/addons/_triangle.scss +0 -63
  93. data/app/assets/stylesheets/addons/_word-wrap.scss +0 -29
  94. data/app/assets/stylesheets/css3/_animation.scss +0 -61
  95. data/app/assets/stylesheets/css3/_appearance.scss +0 -5
  96. data/app/assets/stylesheets/css3/_backface-visibility.scss +0 -5
  97. data/app/assets/stylesheets/css3/_background-image.scss +0 -44
  98. data/app/assets/stylesheets/css3/_background.scss +0 -57
  99. data/app/assets/stylesheets/css3/_border-image.scss +0 -61
  100. data/app/assets/stylesheets/css3/_calc.scss +0 -6
  101. data/app/assets/stylesheets/css3/_columns.scss +0 -67
  102. data/app/assets/stylesheets/css3/_filter.scss +0 -6
  103. data/app/assets/stylesheets/css3/_flex-box.scss +0 -327
  104. data/app/assets/stylesheets/css3/_font-face.scss +0 -29
  105. data/app/assets/stylesheets/css3/_font-feature-settings.scss +0 -6
  106. data/app/assets/stylesheets/css3/_hidpi-media-query.scss +0 -12
  107. data/app/assets/stylesheets/css3/_hyphens.scss +0 -6
  108. data/app/assets/stylesheets/css3/_image-rendering.scss +0 -15
  109. data/app/assets/stylesheets/css3/_keyframes.scss +0 -38
  110. data/app/assets/stylesheets/css3/_linear-gradient.scss +0 -40
  111. data/app/assets/stylesheets/css3/_perspective.scss +0 -12
  112. data/app/assets/stylesheets/css3/_placeholder.scss +0 -10
  113. data/app/assets/stylesheets/css3/_radial-gradient.scss +0 -40
  114. data/app/assets/stylesheets/css3/_selection.scss +0 -44
  115. data/app/assets/stylesheets/css3/_text-decoration.scss +0 -27
  116. data/app/assets/stylesheets/css3/_transform.scss +0 -21
  117. data/app/assets/stylesheets/css3/_transition.scss +0 -81
  118. data/app/assets/stylesheets/css3/_user-select.scss +0 -5
  119. data/app/assets/stylesheets/functions/_assign-inputs.scss +0 -16
  120. data/app/assets/stylesheets/functions/_contains-falsy.scss +0 -25
  121. data/app/assets/stylesheets/functions/_contains.scss +0 -31
  122. data/app/assets/stylesheets/functions/_is-size.scss +0 -23
  123. data/app/assets/stylesheets/functions/_modular-scale.scss +0 -74
  124. data/app/assets/stylesheets/functions/_px-to-em.scss +0 -24
  125. data/app/assets/stylesheets/functions/_px-to-rem.scss +0 -26
  126. data/app/assets/stylesheets/functions/_shade.scss +0 -24
  127. data/app/assets/stylesheets/functions/_strip-units.scss +0 -22
  128. data/app/assets/stylesheets/functions/_tint.scss +0 -24
  129. data/app/assets/stylesheets/functions/_transition-property-name.scss +0 -37
  130. data/app/assets/stylesheets/helpers/_convert-units.scss +0 -26
  131. data/app/assets/stylesheets/helpers/_gradient-positions-parser.scss +0 -24
  132. data/app/assets/stylesheets/helpers/_linear-angle-parser.scss +0 -35
  133. data/app/assets/stylesheets/helpers/_linear-gradient-parser.scss +0 -51
  134. data/app/assets/stylesheets/helpers/_linear-positions-parser.scss +0 -77
  135. data/app/assets/stylesheets/helpers/_linear-side-corner-parser.scss +0 -41
  136. data/app/assets/stylesheets/helpers/_radial-arg-parser.scss +0 -74
  137. data/app/assets/stylesheets/helpers/_radial-gradient-parser.scss +0 -55
  138. data/app/assets/stylesheets/helpers/_radial-positions-parser.scss +0 -28
  139. data/app/assets/stylesheets/helpers/_render-gradients.scss +0 -31
  140. data/app/assets/stylesheets/helpers/_shape-size-stripper.scss +0 -15
  141. data/app/assets/stylesheets/helpers/_str-to-num.scss +0 -55
  142. data/app/assets/stylesheets/settings/_deprecation-warnings.scss +0 -8
  143. data/app/assets/stylesheets/settings/_prefixer.scss +0 -9
  144. data/app/assets/stylesheets/settings/_px-to-em.scss +0 -1
  145. data/circle.yml +0 -10
  146. data/eyeglass-exports.js +0 -7
  147. data/sache.json +0 -5
  148. data/spec/bourbon/addons/retina_image_spec.rb +0 -57
  149. data/spec/bourbon/addons/triangle_spec.rb +0 -32
  150. data/spec/bourbon/css3/font_face_spec.rb +0 -45
  151. data/spec/bourbon/css3/hidpi_media_query_spec.rb +0 -23
  152. data/spec/bourbon/functions/px_to_em_spec.rb +0 -31
  153. data/spec/bourbon/functions/px_to_rem_spec.rb +0 -25
  154. data/spec/bourbon/helpers/convert_units_spec.rb +0 -31
  155. data/spec/bourbon/helpers/str_to_num_spec.rb +0 -25
  156. data/spec/fixtures/addons/retina-image.scss +0 -21
  157. data/spec/fixtures/addons/triangle.scss +0 -9
  158. data/spec/fixtures/css3/font-face.scss +0 -6
  159. data/spec/fixtures/css3/hidpi-media-query.scss +0 -13
  160. data/spec/fixtures/functions/px-to-em.scss +0 -17
  161. data/spec/fixtures/functions/px-to-rem.scss +0 -15
  162. data/spec/fixtures/functions/strip-units.scss +0 -17
  163. data/spec/fixtures/helpers/convert-units.scss +0 -17
  164. data/spec/fixtures/helpers/str-to-num.scss +0 -13
@@ -1,41 +0,0 @@
1
- // Private function for linear-gradient-parser
2
- @function _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals) {
3
- @if $output-bourbon-deprecation-warnings == true {
4
- @warn "[Bourbon] [Deprecation] `_linear-side-corner-parser` is " +
5
- "deprecated and will be removed in 5.0.0.";
6
- }
7
-
8
- $user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
9
- $output-bourbon-deprecation-warnings: false !global;
10
-
11
- $val-1: str-slice($first-val, 1, $has-multiple-vals - 1);
12
- $val-2: str-slice($first-val, $has-multiple-vals + 1, str-length($first-val));
13
- $val-3: null;
14
- $has-val-3: str-index($val-2, " ");
15
-
16
- @if $has-val-3 {
17
- $val-3: str-slice($val-2, $has-val-3 + 1, str-length($val-2));
18
- $val-2: str-slice($val-2, 1, $has-val-3 - 1);
19
- }
20
-
21
- $pos: _position-flipper($val-1) _position-flipper($val-2) _position-flipper($val-3);
22
- $pos: unquote($pos + "");
23
-
24
- $output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
25
-
26
- // Use old spec for webkit
27
- @if $val-1 == "to" {
28
- @return (
29
- webkit-image: -webkit- + $prefix + $pos + $suffix,
30
- spec-image: $image
31
- );
32
- }
33
-
34
- // Bring the code up to spec
35
- @else {
36
- @return (
37
- webkit-image: -webkit- + $image,
38
- spec-image: $prefix + "to " + $pos + $suffix
39
- );
40
- }
41
- }
@@ -1,74 +0,0 @@
1
- @function _radial-arg-parser($g1, $g2, $pos, $shape-size) {
2
- @if $output-bourbon-deprecation-warnings == true {
3
- @warn "[Bourbon] [Deprecation] `_radial-arg-parser` is " +
4
- "deprecated and will be removed in 5.0.0.";
5
- }
6
-
7
- @each $value in $g1, $g2 {
8
- $first-val: nth($value, 1);
9
- $pos-type: type-of($first-val);
10
- $spec-at-index: null;
11
-
12
- // Determine if spec was passed to mixin
13
- @if type-of($value) == list {
14
- $spec-at-index: if(index($value, at), index($value, at), false);
15
- }
16
- @if $spec-at-index {
17
- @if $spec-at-index > 1 {
18
- @for $i from 1 through ($spec-at-index - 1) {
19
- $shape-size: $shape-size nth($value, $i);
20
- }
21
- @for $i from ($spec-at-index + 1) through length($value) {
22
- $pos: $pos nth($value, $i);
23
- }
24
- }
25
- @else if $spec-at-index == 1 {
26
- @for $i from ($spec-at-index + 1) through length($value) {
27
- $pos: $pos nth($value, $i);
28
- }
29
- }
30
- $g1: null;
31
- }
32
-
33
- // If not spec calculate correct values
34
- @else {
35
- @if ($pos-type != color) or ($first-val != "transparent") {
36
- @if ($pos-type == number)
37
- or ($first-val == "center")
38
- or ($first-val == "top")
39
- or ($first-val == "right")
40
- or ($first-val == "bottom")
41
- or ($first-val == "left") {
42
-
43
- $pos: $value;
44
-
45
- @if $pos == $g1 {
46
- $g1: null;
47
- }
48
- }
49
-
50
- @else if
51
- ($first-val == "ellipse")
52
- or ($first-val == "circle")
53
- or ($first-val == "closest-side")
54
- or ($first-val == "closest-corner")
55
- or ($first-val == "farthest-side")
56
- or ($first-val == "farthest-corner")
57
- or ($first-val == "contain")
58
- or ($first-val == "cover") {
59
-
60
- $shape-size: $value;
61
-
62
- @if $value == $g1 {
63
- $g1: null;
64
- }
65
-
66
- @else if $value == $g2 {
67
- $g2: null;
68
- }
69
- }
70
- }
71
- }
72
- }
73
- @return $g1, $g2, $pos, $shape-size;
74
- }
@@ -1,55 +0,0 @@
1
- @function _radial-gradient-parser($image) {
2
- @if $output-bourbon-deprecation-warnings == true {
3
- @warn "[Bourbon] [Deprecation] `_radial-gradient-parser` is " +
4
- "deprecated and will be removed in 5.0.0.";
5
- }
6
-
7
- $image: unquote($image);
8
- $gradients: ();
9
- $start: str-index($image, "(");
10
- $end: str-index($image, ",");
11
- $first-val: str-slice($image, $start + 1, $end - 1);
12
-
13
- $prefix: str-slice($image, 1, $start);
14
- $suffix: str-slice($image, $end, str-length($image));
15
-
16
- $is-spec-syntax: str-index($first-val, "at");
17
-
18
- @if $is-spec-syntax and $is-spec-syntax > 1 {
19
- $keyword: str-slice($first-val, 1, $is-spec-syntax - 2);
20
- $pos: str-slice($first-val, $is-spec-syntax + 3, str-length($first-val));
21
- $pos: append($pos, $keyword, comma);
22
-
23
- $gradients: (
24
- webkit-image: -webkit- + $prefix + $pos + $suffix,
25
- spec-image: $image
26
- );
27
- }
28
-
29
- @else if $is-spec-syntax == 1 {
30
- $pos: str-slice($first-val, $is-spec-syntax + 3, str-length($first-val));
31
-
32
- $gradients: (
33
- webkit-image: -webkit- + $prefix + $pos + $suffix,
34
- spec-image: $image
35
- );
36
- }
37
-
38
- @else if str-index($image, "cover") or str-index($image, "contain") {
39
- @warn "Radial-gradient needs to be updated to conform to latest spec.";
40
-
41
- $gradients: (
42
- webkit-image: null,
43
- spec-image: $image
44
- );
45
- }
46
-
47
- @else {
48
- $gradients: (
49
- webkit-image: -webkit- + $image,
50
- spec-image: $image
51
- );
52
- }
53
-
54
- @return $gradients;
55
- }
@@ -1,28 +0,0 @@
1
- @function _radial-positions-parser($gradient-pos) {
2
- @if $output-bourbon-deprecation-warnings == true {
3
- @warn "[Bourbon] [Deprecation] `_radial-positions-parser` is " +
4
- "deprecated and will be removed in 5.0.0.";
5
- }
6
-
7
- $user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
8
- $output-bourbon-deprecation-warnings: false !global;
9
-
10
- $shape-size: nth($gradient-pos, 1);
11
- $pos: nth($gradient-pos, 2);
12
- $shape-size-spec: _shape-size-stripper($shape-size);
13
-
14
- $pre-spec: unquote(if($pos, "#{$pos}, ", null))
15
- unquote(if($shape-size, "#{$shape-size},", null));
16
- $pos-spec: if($pos, "at #{$pos}", null);
17
-
18
- $spec: "#{$shape-size-spec} #{$pos-spec}";
19
-
20
- // Add comma
21
- @if ($spec != " ") {
22
- $spec: "#{$spec},";
23
- }
24
-
25
- $output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
26
-
27
- @return $pre-spec $spec;
28
- }
@@ -1,31 +0,0 @@
1
- // User for linear and radial gradients within background-image or border-image properties
2
-
3
- @function _render-gradients($gradient-positions, $gradients, $gradient-type, $vendor: false) {
4
- @if $output-bourbon-deprecation-warnings == true {
5
- @warn "[Bourbon] [Deprecation] `_render-gradients` is " +
6
- "deprecated and will be removed in 5.0.0.";
7
- }
8
-
9
- $pre-spec: null;
10
- $spec: null;
11
- $vendor-gradients: null;
12
- @if $gradient-type == linear {
13
- @if $gradient-positions {
14
- $pre-spec: nth($gradient-positions, 1);
15
- $spec: nth($gradient-positions, 2);
16
- }
17
- }
18
- @else if $gradient-type == radial {
19
- $pre-spec: nth($gradient-positions, 1);
20
- $spec: nth($gradient-positions, 2);
21
- }
22
-
23
- @if $vendor {
24
- $vendor-gradients: -#{$vendor}-#{$gradient-type}-gradient(#{$pre-spec} $gradients);
25
- }
26
- @else if $vendor == false {
27
- $vendor-gradients: "#{$gradient-type}-gradient(#{$spec} #{$gradients})";
28
- $vendor-gradients: unquote($vendor-gradients);
29
- }
30
- @return $vendor-gradients;
31
- }
@@ -1,15 +0,0 @@
1
- @function _shape-size-stripper($shape-size) {
2
- @if $output-bourbon-deprecation-warnings == true {
3
- @warn "[Bourbon] [Deprecation] `_shape-size-stripper` is " +
4
- "deprecated and will be removed in 5.0.0.";
5
- }
6
-
7
- $shape-size-spec: null;
8
- @each $value in $shape-size {
9
- @if ($value == "cover") or ($value == "contain") {
10
- $value: null;
11
- }
12
- $shape-size-spec: "#{$shape-size-spec} #{$value}";
13
- }
14
- @return $shape-size-spec;
15
- }
@@ -1,55 +0,0 @@
1
- //************************************************************************//
2
- // Helper function for linear/radial-gradient-parsers.
3
- // Source: http://sassmeister.com/gist/9647408
4
- //************************************************************************//
5
- @function _str-to-num($string) {
6
- @if $output-bourbon-deprecation-warnings == true {
7
- @warn "[Bourbon] [Deprecation] `_str-to-num` is " +
8
- "deprecated and will be removed in 5.0.0.";
9
- }
10
-
11
- // Matrices
12
- $strings: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9";
13
- $numbers: 0 1 2 3 4 5 6 7 8 9;
14
-
15
- // Result
16
- $result: 0;
17
- $divider: 0;
18
- $minus: false;
19
-
20
- // Looping through all characters
21
- @for $i from 1 through str-length($string) {
22
- $character: str-slice($string, $i, $i);
23
- $index: index($strings, $character);
24
-
25
- @if $character == "-" {
26
- $minus: true;
27
- }
28
-
29
- @else if $character == "." {
30
- $divider: 1;
31
- }
32
-
33
- @else {
34
- @if not $index {
35
- $result: if($minus, $result * -1, $result);
36
- @return _convert-units($result, str-slice($string, $i));
37
- }
38
-
39
- $number: nth($numbers, $index);
40
-
41
- @if $divider == 0 {
42
- $result: $result * 10;
43
- }
44
-
45
- @else {
46
- // Move the decimal dot to the left
47
- $divider: $divider * 10;
48
- $number: $number / $divider;
49
- }
50
-
51
- $result: $result + $number;
52
- }
53
- }
54
- @return if($minus, $result * -1, $result);
55
- }
@@ -1,8 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Enable or disable output of Bourbon’s deprecation-related Sass warnings.
4
- /// This variable must be declared _before_ importing Bourbon.
5
- ///
6
- /// @type Bool
7
-
8
- $output-bourbon-deprecation-warnings: true !default;
@@ -1,9 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Global variables to enable or disable vendor prefixes
4
-
5
- $prefix-for-webkit: true !default;
6
- $prefix-for-mozilla: true !default;
7
- $prefix-for-microsoft: true !default;
8
- $prefix-for-opera: true !default;
9
- $prefix-for-spec: true !default;
@@ -1 +0,0 @@
1
- $em-base: 16px !default;
data/circle.yml DELETED
@@ -1,10 +0,0 @@
1
- general:
2
- branches:
3
- ignore:
4
- - gh-pages
5
- machine:
6
- ruby:
7
- version: 2.3.0
8
- test:
9
- override:
10
- - bundle exec rake
@@ -1,7 +0,0 @@
1
- var bourbon = require("./index");
2
-
3
- module.exports = function(eyeglass, sass) {
4
- return {
5
- sassDir: bourbon.includePaths[0]
6
- };
7
- };
data/sache.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "name": "Bourbon",
3
- "description": "A simple and lightweight mixin library for Sass",
4
- "tags": ["add-ons", "animation", "functions", "library", "mixins", "prefixing"]
5
- }
@@ -1,57 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe "retina-image" do
4
- before(:all) do
5
- ParserSupport.parse_file("addons/retina-image")
6
- end
7
-
8
- context "called with defaults" do
9
- it "applies defaults" do
10
- ruleset = 'background-image: url("retina-default.png");; ' +
11
- 'background-image: url("retina-default_2x.png"); ' +
12
- 'background-size: "320px 480px";'
13
-
14
- expect(".retina-default").to have_ruleset(ruleset)
15
- end
16
- end
17
-
18
- context "called with extension" do
19
- it "applies file extension" do
20
- ruleset = 'background-image: url("retina-extension.jpg");; ' +
21
- 'background-image: url("retina-extension_2x.jpg"); ' +
22
- 'background-size: "20px 40px";'
23
-
24
- expect(".retina-extension").to have_ruleset(ruleset)
25
- end
26
- end
27
-
28
- context "called with custom retina filename" do
29
- it "applies filename" do
30
- ruleset = 'background-image: url("default.png");; ' +
31
- 'background-image: url("custom.png"); ' +
32
- 'background-size: "10px 5px";'
33
-
34
- expect(".retina-custom-name").to have_ruleset(ruleset)
35
- end
36
- end
37
-
38
- context "called with custom retina suffix" do
39
- it "applies suffix" do
40
- ruleset = 'background-image: url("default.png");; ' +
41
- 'background-image: url("default@2x.png"); ' +
42
- 'background-size: "3em 2em";'
43
-
44
- expect(".retina-custom-suffix").to have_ruleset(ruleset)
45
- end
46
- end
47
-
48
- context "called with no pipeline" do
49
- it "applies suffix" do
50
- ruleset = 'background-image: url("default.jpg");; ' +
51
- 'background-image: url("default.jpg"); ' +
52
- 'background-size: "100px 20px";'
53
-
54
- expect(".retina-pipeline").to have_ruleset(ruleset)
55
- end
56
- end
57
- end
@@ -1,32 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe "triangle" do
4
- before(:all) do
5
- ParserSupport.parse_file("addons/triangle")
6
- end
7
-
8
- context "called on element" do
9
- it "adds triangle" do
10
- input = ".triangle-down"
11
- ruleset = "height: 0; " +
12
- "width: 0; " +
13
- "border-left: 6px solid transparent; " +
14
- "border-right: 6px solid transparent; " +
15
- "border-top: 6px solid #ffffff;"
16
-
17
- expect(input).to have_ruleset(ruleset)
18
- end
19
- end
20
-
21
- context "called on element with corner arguments" do
22
- it "adds triangle on corner" do
23
- input = ".triangle-corner"
24
- ruleset = "height: 0; " +
25
- "width: 0; " +
26
- "border-top: 6px solid #000000; " +
27
- "border-right: 12px solid #aaaaaa;"
28
-
29
- expect(input).to have_ruleset(ruleset)
30
- end
31
- end
32
- end