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
@@ -4,7 +4,9 @@
4
4
  ///
5
5
  /// @ignore You can also use `false` instead of `null`.
6
6
  ///
7
- /// @param {List} $vals
7
+ /// @access private
8
+ ///
9
+ /// @param {List} $values
8
10
  /// List of directional values
9
11
  ///
10
12
  /// @example scss - Usage
@@ -26,18 +28,13 @@
26
28
  ///
27
29
  /// @return {List}
28
30
 
29
- @function collapse-directionals($vals) {
30
- @if $output-bourbon-deprecation-warnings == true {
31
- @warn "[Bourbon] [Deprecation] `collapse-directionals` is deprecated and " +
32
- "will be removed in 5.0.0.";
33
- }
34
-
31
+ @function collapse-directionals($values) {
35
32
  $output: null;
36
33
 
37
- $a: nth($vals, 1);
38
- $b: if(length($vals) < 2, $a, nth($vals, 2));
39
- $c: if(length($vals) < 3, $a, nth($vals, 3));
40
- $d: if(length($vals) < 2, $a, nth($vals, if(length($vals) < 4, 2, 4)));
34
+ $a: nth($values, 1);
35
+ $b: if(length($values) < 2, $a, nth($values, 2));
36
+ $c: if(length($values) < 3, $a, nth($values, 3));
37
+ $d: if(length($values) < 2, $a, nth($values, if(length($values) < 4, 2, 4)));
41
38
 
42
39
  @if $a == 0 { $a: 0; }
43
40
  @if $b == 0 { $b: 0; }
@@ -60,18 +57,13 @@
60
57
  /// Prefix to use
61
58
  /// @param {String} $suf
62
59
  /// Suffix to use
63
- /// @param {List} $vals
60
+ /// @param {List} $values
64
61
  /// List of values
65
62
  ///
66
63
  /// @require {function} collapse-directionals
67
64
  /// @require {function} contains-falsy
68
65
 
69
- @mixin directional-property($pre, $suf, $vals) {
70
- @include _bourbon-deprecate("directional-property");
71
-
72
- $user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
73
- $output-bourbon-deprecation-warnings: false !global;
74
-
66
+ @mixin directional-property($pre, $suf, $values) {
75
67
  // Property Names
76
68
  $top: $pre + "-top" + if($suf, "-#{$suf}", "");
77
69
  $bottom: $pre + "-bottom" + if($suf, "-#{$suf}", "");
@@ -79,30 +71,28 @@
79
71
  $right: $pre + "-right" + if($suf, "-#{$suf}", "");
80
72
  $all: $pre + if($suf, "-#{$suf}", "");
81
73
 
82
- $vals: collapse-directionals($vals);
74
+ $values: collapse-directionals($values);
83
75
 
84
- @if contains-falsy($vals) {
85
- @if nth($vals, 1) { #{$top}: nth($vals, 1); }
76
+ @if contains-falsy($values) {
77
+ @if nth($values, 1) { #{$top}: nth($values, 1); }
86
78
 
87
- @if length($vals) == 1 {
88
- @if nth($vals, 1) { #{$right}: nth($vals, 1); }
79
+ @if length($values) == 1 {
80
+ @if nth($values, 1) { #{$right}: nth($values, 1); }
89
81
  } @else {
90
- @if nth($vals, 2) { #{$right}: nth($vals, 2); }
82
+ @if nth($values, 2) { #{$right}: nth($values, 2); }
91
83
  }
92
84
 
93
- @if length($vals) == 2 {
94
- @if nth($vals, 1) { #{$bottom}: nth($vals, 1); }
95
- @if nth($vals, 2) { #{$left}: nth($vals, 2); }
96
- } @else if length($vals) == 3 {
97
- @if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
98
- @if nth($vals, 2) { #{$left}: nth($vals, 2); }
99
- } @else if length($vals) == 4 {
100
- @if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
101
- @if nth($vals, 4) { #{$left}: nth($vals, 4); }
85
+ @if length($values) == 2 {
86
+ @if nth($values, 1) { #{$bottom}: nth($values, 1); }
87
+ @if nth($values, 2) { #{$left}: nth($values, 2); }
88
+ } @else if length($values) == 3 {
89
+ @if nth($values, 3) { #{$bottom}: nth($values, 3); }
90
+ @if nth($values, 2) { #{$left}: nth($values, 2); }
91
+ } @else if length($values) == 4 {
92
+ @if nth($values, 3) { #{$bottom}: nth($values, 3); }
93
+ @if nth($values, 4) { #{$left}: nth($values, 4); }
102
94
  }
103
95
  } @else {
104
- #{$all}: $vals;
96
+ #{$all}: $values;
105
97
  }
106
-
107
- $output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
108
98
  }
@@ -2,11 +2,6 @@
2
2
  // Reference: http://goo.gl/Ru1bKP
3
3
 
4
4
  @function font-url-prefixer($asset-pipeline) {
5
- @if $output-bourbon-deprecation-warnings == true {
6
- @warn "[Bourbon] [Deprecation] `font-url-prefixer` is deprecated and " +
7
- "will be removed in 5.0.0.";
8
- }
9
-
10
5
  @if $asset-pipeline == true {
11
6
  @return font-url;
12
7
  } @else {
@@ -21,11 +16,6 @@
21
16
  $file-formats,
22
17
  $font-url) {
23
18
 
24
- @if $output-bourbon-deprecation-warnings == true {
25
- @warn "[Bourbon] [Deprecation] `font-source-declaration` is deprecated " +
26
- "and will be removed in 5.0.0.";
27
- }
28
-
29
19
  $src: ();
30
20
 
31
21
  $formats-map: (
@@ -2,6 +2,6 @@
2
2
 
3
3
  /// A global setting to enable or disable the `$asset-pipeline` variable for all functions that accept it.
4
4
  ///
5
- /// @type Bool
5
+ /// @type boolean
6
6
 
7
7
  $asset-pipeline: false !default;
@@ -0,0 +1,12 @@
1
+ @charset "UTF-8";
2
+
3
+ /// A global setting for font file formats for the `font-face` mixin.
4
+ ///
5
+ /// @see {mixin} font-face
6
+ ///
7
+ /// @example scss
8
+ /// $global-font-file-formats: woff2 woff;
9
+ ///
10
+ /// @type list | string
11
+
12
+ $global-font-file-formats: ttf woff2 woff !default;
@@ -0,0 +1,17 @@
1
+ @charset "UTF-8";
2
+
3
+ /// Global setting for the modular scale ratio
4
+ ///
5
+ /// @see {function} modular-scale
6
+ ///
7
+ /// @type number
8
+
9
+ $modular-scale-ratio: $perfect-fourth !default;
10
+
11
+ /// Global setting for the modular scale base value
12
+ ///
13
+ /// @see {function} modular-scale
14
+ ///
15
+ /// @type number
16
+
17
+ $modular-scale-base: 1em !default;
@@ -0,0 +1,27 @@
1
+ @charset "UTF-8";
2
+
3
+ ////
4
+ /// Pre-defined scales for use with the `modular-scale` function
5
+ ///
6
+ /// @see {function} modular-scale
7
+ ///
8
+ /// @type number
9
+ ////
10
+
11
+ $minor-second: 1.067;
12
+ $major-second: 1.125;
13
+ $minor-third: 1.2;
14
+ $major-third: 1.25;
15
+ $perfect-fourth: 1.333;
16
+ $augmented-fourth: 1.414;
17
+ $perfect-fifth: 1.5;
18
+ $minor-sixth: 1.6;
19
+ $golden: 1.618;
20
+ $major-sixth: 1.667;
21
+ $minor-seventh: 1.778;
22
+ $major-seventh: 1.875;
23
+ $octave: 2;
24
+ $major-tenth: 2.5;
25
+ $major-eleventh: 2.667;
26
+ $major-twelfth: 3;
27
+ $double-octave: 4;
@@ -6,7 +6,7 @@ Given /^I install bourbon to "([^"]*)"$/ do |path|
6
6
  end
7
7
 
8
8
  Then /^the sass directories(?: with "([^"]+)" prefix)? should have been generated$/ do |prefix|
9
- sass_directories = ["addons", "css3", "functions"]
9
+ sass_directories = ["bourbon/addons", "bourbon/css3", "bourbon/functions"]
10
10
  sass_directories.map!{ |directory| bourbon_path(prefix, directory) }
11
11
  check_directory_presence(sass_directories, true)
12
12
  end
data/index.js CHANGED
@@ -2,6 +2,6 @@ var path = require('path');
2
2
 
3
3
  module.exports = {
4
4
  includePaths: [
5
- path.join(__dirname, 'app/assets/stylesheets')
5
+ path.join(__dirname, 'core')
6
6
  ]
7
7
  };
@@ -1,5 +1,5 @@
1
1
  module Bourbon
2
2
  class Engine < Rails::Engine
3
- # auto wire
3
+ config.assets.paths << File.expand_path("../../../core", __FILE__)
4
4
  end
5
5
  end
@@ -70,7 +70,7 @@ module Bourbon
70
70
  end
71
71
 
72
72
  def stylesheets_directory
73
- File.join(top_level_directory, "app", "assets", "stylesheets")
73
+ File.join(top_level_directory, "core")
74
74
  end
75
75
 
76
76
  def top_level_directory
@@ -1,3 +1,3 @@
1
1
  module Bourbon
2
- VERSION = "4.3.4"
2
+ VERSION = "5.0.0.alpha.0"
3
3
  end
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "bourbon",
3
- "version": "4.3.4",
3
+ "version": "5.0.0.alpha.0",
4
4
  "description": "A simple and lightweight mixin library for Sass.",
5
5
  "keywords": [
6
6
  "css",
7
- "eyeglass-module",
8
7
  "mixins",
9
8
  "sass",
10
9
  "scss"
@@ -13,10 +12,6 @@
13
12
  "bugs": {
14
13
  "url": "https://github.com/thoughtbot/bourbon/issues"
15
14
  },
16
- "eyeglass": {
17
- "needs": "*",
18
- "exports": "eyeglass-exports.js"
19
- },
20
15
  "license": "MIT",
21
16
  "author": {
22
17
  "name": "thoughtbot",
@@ -6,9 +6,9 @@ describe "buttons" do
6
6
 
7
7
  @buttons_list = %w(
8
8
  button
9
- input[type="button"]
10
- input[type="reset"]
11
- input[type="submit"]
9
+ [type="button"]
10
+ [type="reset"]
11
+ [type="submit"]
12
12
  )
13
13
  end
14
14
 
@@ -7,19 +7,29 @@ describe "font-stacks" do
7
7
 
8
8
  context "stacks used in variable" do
9
9
  it "output stacks" do
10
- georgia = '"Georgia", "Cambria", "Times New Roman", "Times", serif'
11
- helvetica = '"Helvetica Neue", "Helvetica", "Roboto", ' +
12
- '"Arial", sans-serif'
13
- lucida_grande = '"Lucida Grande", "Tahoma", "Verdana", ' +
14
- '"Arial", sans-serif'
15
- monospace = '"Bitstream Vera Sans Mono", "Consolas", "Courier", monospace'
10
+ helvetica = '"Helvetica Neue", "Helvetica", "Arial", sans-serif'
11
+ lucida_grande = '"Lucida Grande", "Lucida Sans Unicode", ' +
12
+ '"Lucida Sans", "Geneva", "Verdana", sans-serif'
16
13
  verdana = '"Verdana", "Geneva", sans-serif'
14
+ garamond = '"Garamond", "Baskerville", "Baskerville Old Face", ' +
15
+ '"Hoefler Text", "Times New Roman", serif'
16
+ georgia = '"Georgia", "Times", "Times New Roman", serif'
17
+ hoefler_text = '"Hoefler Text", "Baskerville Old Face", ' +
18
+ '"Garamond", "Times New Roman", serif'
19
+ consolas = '"Consolas", "monaco", monospace'
20
+ courier_new = '"Courier New", "Courier", "Lucida Sans Typewriter", ' +
21
+ '"Lucida Typewriter", monospace'
22
+ monaco = '"monaco", "Consolas", "Lucida Console", monospace'
17
23
 
18
- expect("$georgia").to have_value(georgia)
19
- expect("$helvetica").to have_value(helvetica)
20
- expect("$lucida-grande").to have_value(lucida_grande)
21
- expect("$monospace").to have_value(monospace)
22
- expect("$verdana").to have_value(verdana)
24
+ expect(".helvetica").to have_value(helvetica)
25
+ expect(".lucida-grande").to have_value(lucida_grande)
26
+ expect(".verdana").to have_value(verdana)
27
+ expect(".garamond").to have_value(garamond)
28
+ expect(".georgia").to have_value(georgia)
29
+ expect(".hoefler-text").to have_value(hoefler_text)
30
+ expect(".consolas").to have_value(consolas)
31
+ expect(".courier-new").to have_value(courier_new)
32
+ expect(".monaco").to have_value(monaco)
23
33
  end
24
34
  end
25
35
  end
@@ -5,20 +5,20 @@ describe "text-inputs" do
5
5
  ParserSupport.parse_file("addons/text-inputs")
6
6
 
7
7
  @inputs_list = %w(
8
- input[type="color"]
9
- input[type="date"]
10
- input[type="datetime"]
11
- input[type="datetime-local"]
12
- input[type="email"]
13
- input[type="month"]
14
- input[type="number"]
15
- input[type="password"]
16
- input[type="search"]
17
- input[type="tel"]
18
- input[type="text"]
19
- input[type="time"]
20
- input[type="url"]
21
- input[type="week"]
8
+ [type="color"]
9
+ [type="date"]
10
+ [type="datetime"]
11
+ [type="datetime-local"]
12
+ [type="email"]
13
+ [type="month"]
14
+ [type="number"]
15
+ [type="password"]
16
+ [type="search"]
17
+ [type="tel"]
18
+ [type="text"]
19
+ [type="time"]
20
+ [type="url"]
21
+ [type="week"]
22
22
  input:not([type])
23
23
  textarea
24
24
  )
@@ -0,0 +1,18 @@
1
+ require "spec_helper"
2
+
3
+ describe "font-face" do
4
+ before(:all) do
5
+ ParserSupport.parse_file("css3/font-face-1")
6
+ end
7
+
8
+ context "called with defaults" do
9
+ it "outputs defaults" do
10
+ ruleset = 'font-family: "source-sans-pro"; ' +
11
+ 'font-style: normal; ' +
12
+ 'font-weight: normal; ' +
13
+ 'src: url("/fonts/source-sans-pro/source-sans-pro-regular.woff2") format("woff2"), url("/fonts/source-sans-pro/source-sans-pro-regular.woff") format("woff"), url("/fonts/source-sans-pro/source-sans-pro-regular.ttf") format("truetype");'
14
+
15
+ expect("@font-face").to have_ruleset(ruleset)
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,19 @@
1
+ require "spec_helper"
2
+
3
+ describe "font-face" do
4
+ before(:all) do
5
+ ParserSupport.parse_file("css3/font-face-2")
6
+ end
7
+
8
+ context "called with defaults" do
9
+ it "outputs defaults" do
10
+ ruleset = 'font-family: "roboto"; ' +
11
+ 'font-style: "italic"; ' +
12
+ 'font-weight: "bold"; ' +
13
+ 'src: url("/assets/fonts/Roboto-BoldItalic.ttf") ' +
14
+ 'format("truetype");'
15
+
16
+ expect("@font-face").to have_ruleset(ruleset)
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,18 @@
1
+ require "spec_helper"
2
+
3
+ describe "font-face" do
4
+ before(:all) do
5
+ ParserSupport.parse_file("css3/font-face-3")
6
+ end
7
+
8
+ context "called with defaults" do
9
+ it "outputs defaults" do
10
+ ruleset = 'font-family: "pitch"; ' +
11
+ 'font-style: "normal"; ' +
12
+ 'font-weight: "normal"; ' +
13
+ 'src: url("/fonts/pitch.woff") format("woff");'
14
+
15
+ expect("@font-face").to have_ruleset(ruleset)
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,19 @@
1
+ require "spec_helper"
2
+
3
+ describe "font-face" do
4
+ before(:all) do
5
+ ParserSupport.parse_file("css3/font-face-4")
6
+ end
7
+
8
+ context "called with defaults" do
9
+ it "outputs defaults" do
10
+ ruleset = 'font-family: "circular"; ' +
11
+ 'font-style: "normal"; ' +
12
+ 'font-weight: "normal"; ' +
13
+ 'src: url("/circular.woff2") format("woff2"), ' +
14
+ 'url("/circular.svg#circular") format("svg");'
15
+
16
+ expect("@font-face").to have_ruleset(ruleset)
17
+ end
18
+ end
19
+ end
@@ -4,8 +4,8 @@ describe "assign-inputs" do
4
4
  before(:all) do
5
5
  ParserSupport.parse_file("functions/assign-inputs")
6
6
  @text_inputs_list = [
7
- "input[type=\"password\"]",
8
- "input[type=\"text\"]",
7
+ "[type=\"password\"]",
8
+ "[type=\"text\"]",
9
9
  "textarea"
10
10
  ]
11
11
  end
@@ -41,7 +41,7 @@ describe "assign-inputs" do
41
41
  context "expands text inputs when middle of list" do
42
42
  it "finds selectors" do
43
43
  list = @text_inputs_list.dup
44
- list.unshift "input[type=\"file\"]"
44
+ list.unshift "[type=\"file\"]"
45
45
  list.each do |input|
46
46
  expect(input).to have_rule("color: #ff00ff")
47
47
  end