bourbon 5.0.0.beta.1 → 5.0.0.beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/.scss-lint.yml +8 -0
  3. data/NEWS.md +31 -9
  4. data/README.md +2 -2
  5. data/bourbon.gemspec +1 -1
  6. data/bower.json +9 -9
  7. data/core/_bourbon.scss +40 -38
  8. data/core/bourbon/{settings → helpers}/_scales.scss +0 -0
  9. data/core/bourbon/{addons → helpers}/_timing-functions.scss +0 -0
  10. data/core/bourbon/{addons → library}/_border-color.scss +0 -0
  11. data/core/bourbon/{addons → library}/_border-radius.scss +0 -0
  12. data/core/bourbon/{addons → library}/_border-style.scss +0 -0
  13. data/core/bourbon/{addons → library}/_border-width.scss +0 -0
  14. data/core/bourbon/{addons → library}/_buttons.scss +0 -0
  15. data/core/bourbon/{addons → library}/_clearfix.scss +0 -0
  16. data/core/bourbon/{addons → library}/_contrast-switch.scss +9 -9
  17. data/core/bourbon/{addons → library}/_ellipsis.scss +0 -0
  18. data/core/bourbon/{addons → library}/_font-face.scss +0 -0
  19. data/core/bourbon/{addons → library}/_font-stacks.scss +0 -0
  20. data/core/bourbon/{addons → library}/_hide-text.scss +0 -0
  21. data/core/bourbon/{addons → library}/_hide-visually.scss +0 -0
  22. data/core/bourbon/{addons → library}/_margin.scss +0 -0
  23. data/core/bourbon/{addons → library}/_modular-scale.scss +0 -0
  24. data/core/bourbon/{addons → library}/_padding.scss +0 -0
  25. data/core/bourbon/{addons → library}/_position.scss +0 -0
  26. data/core/bourbon/{addons → library}/_prefixer.scss +0 -0
  27. data/core/bourbon/{functions → library}/_shade.scss +0 -0
  28. data/core/bourbon/{addons → library}/_size.scss +4 -2
  29. data/core/bourbon/{functions → library}/_strip-unit.scss +0 -0
  30. data/core/bourbon/{addons → library}/_text-inputs.scss +0 -0
  31. data/core/bourbon/{functions → library}/_tint.scss +0 -0
  32. data/core/bourbon/library/_triangle.scss +79 -0
  33. data/core/bourbon/{addons → library}/_word-wrap.scss +0 -0
  34. data/core/bourbon/settings/_settings.scss +8 -0
  35. data/core/bourbon/{functions → utilities}/_assign-inputs.scss +0 -0
  36. data/core/bourbon/{settings → utilities}/_bourbon-get-setting.scss +0 -0
  37. data/core/bourbon/{functions → utilities}/_collapse-directionals.scss +0 -0
  38. data/core/bourbon/{helpers → utilities}/_directional-values.scss +0 -0
  39. data/core/bourbon/{functions → utilities}/_font-source-declaration.scss +0 -0
  40. data/core/bourbon/{functions → utilities}/_unpack.scss +0 -0
  41. data/core/bourbon/{functions → validators}/_contains-falsy.scss +0 -0
  42. data/core/bourbon/{functions → validators}/_contains.scss +0 -0
  43. data/core/bourbon/{functions → validators}/_is-length.scss +0 -0
  44. data/core/bourbon/{functions → validators}/_is-light.scss +3 -1
  45. data/core/bourbon/{functions → validators}/_is-number.scss +0 -0
  46. data/core/bourbon/{functions → validators}/_is-size.scss +0 -0
  47. data/features/step_definitions/bourbon_steps.rb +3 -2
  48. data/lib/bourbon.rb +2 -19
  49. data/lib/bourbon/version.rb +1 -1
  50. data/package.json +16 -16
  51. data/spec/bourbon/{addons → library}/border_color_spec.rb +1 -1
  52. data/spec/bourbon/{addons → library}/border_radius_spec.rb +1 -1
  53. data/spec/bourbon/{addons → library}/border_style_spec.rb +1 -1
  54. data/spec/bourbon/{addons → library}/border_width_spec.rb +1 -1
  55. data/spec/bourbon/{addons → library}/buttons_spec.rb +1 -1
  56. data/spec/bourbon/{addons → library}/clearfix_spec.rb +1 -1
  57. data/spec/bourbon/{addons → library}/contrast_switch_spec.rb +1 -1
  58. data/spec/bourbon/{addons → library}/ellipsis_spec.rb +1 -1
  59. data/spec/bourbon/{addons → library}/font_face_spec_1.rb +0 -0
  60. data/spec/bourbon/{addons → library}/font_face_spec_2.rb +0 -0
  61. data/spec/bourbon/{addons → library}/font_face_spec_3.rb +0 -0
  62. data/spec/bourbon/{addons → library}/font_face_spec_4.rb +0 -0
  63. data/spec/bourbon/{addons → library}/font_stacks_spec.rb +1 -1
  64. data/spec/bourbon/{addons → library}/hide_text_spec.rb +1 -1
  65. data/spec/bourbon/{addons → library}/hide_visually_spec.rb +1 -1
  66. data/spec/bourbon/{addons → library}/margin_spec.rb +1 -1
  67. data/spec/bourbon/{addons → library}/modular_scale_spec.rb +1 -1
  68. data/spec/bourbon/{addons → library}/padding_spec.rb +1 -1
  69. data/spec/bourbon/{addons → library}/position_spec.rb +1 -1
  70. data/spec/bourbon/{functions → library}/shade_spec.rb +1 -1
  71. data/spec/bourbon/{addons → library}/size_spec.rb +1 -1
  72. data/spec/bourbon/{functions → library}/strip_unit_spec.rb +1 -1
  73. data/spec/bourbon/{addons → library}/text_inputs_spec.rb +1 -1
  74. data/spec/bourbon/{functions → library}/tint_spec.rb +1 -1
  75. data/spec/bourbon/library/triangle_spec.rb +31 -0
  76. data/spec/bourbon/{addons → library}/word_wrap_spec.rb +1 -1
  77. data/spec/bourbon/{functions → utilities}/assign_inputs_spec.rb +1 -1
  78. data/spec/bourbon/{settings → utilities}/bourbon_get_setting_spec.rb +1 -1
  79. data/spec/bourbon/{functions → utilities}/collapse_directionals.rb +1 -1
  80. data/spec/bourbon/{helpers → utilities}/directional_values_spec.rb +1 -1
  81. data/spec/bourbon/{functions → utilities}/font_source_declaration_spec.rb +1 -1
  82. data/spec/bourbon/{functions → utilities}/unpack_spec.rb +1 -1
  83. data/spec/bourbon/{functions → validators}/contains_spec.rb +1 -1
  84. data/spec/bourbon/{functions → validators}/is_length_spec.rb +1 -1
  85. data/spec/bourbon/{functions → validators}/is_light_spec.rb +1 -1
  86. data/spec/bourbon/{functions → validators}/is_number_spec.rb +1 -1
  87. data/spec/bourbon/{functions → validators}/is_size_spec.rb +1 -1
  88. data/spec/fixtures/{addons → library}/border-color.scss +0 -0
  89. data/spec/fixtures/{addons → library}/border-radius.scss +0 -0
  90. data/spec/fixtures/{addons → library}/border-style.scss +0 -0
  91. data/spec/fixtures/{addons → library}/border-width.scss +0 -0
  92. data/spec/fixtures/{addons → library}/buttons.scss +0 -0
  93. data/spec/fixtures/{addons → library}/clearfix.scss +0 -0
  94. data/spec/fixtures/{addons → library}/contrast-switch.scss +0 -0
  95. data/spec/fixtures/{addons → library}/ellipsis.scss +0 -0
  96. data/spec/fixtures/{addons → library}/font-face-1.scss +0 -0
  97. data/spec/fixtures/{addons → library}/font-face-2.scss +0 -0
  98. data/spec/fixtures/{addons → library}/font-face-3.scss +0 -0
  99. data/spec/fixtures/{addons → library}/font-face-4.scss +0 -0
  100. data/spec/fixtures/{addons → library}/font-stacks.scss +0 -0
  101. data/spec/fixtures/{addons → library}/hide-text.scss +0 -0
  102. data/spec/fixtures/{addons → library}/hide-visually.scss +0 -0
  103. data/spec/fixtures/{addons → library}/margin.scss +0 -0
  104. data/spec/fixtures/{addons → library}/modular-scale.scss +0 -0
  105. data/spec/fixtures/{addons → library}/padding.scss +0 -0
  106. data/spec/fixtures/{addons → library}/position.scss +0 -0
  107. data/spec/fixtures/{functions → library}/shade.scss +0 -0
  108. data/spec/fixtures/{addons → library}/size.scss +0 -0
  109. data/spec/fixtures/{functions → library}/strip-unit.scss +0 -0
  110. data/spec/fixtures/{addons → library}/text-inputs.scss +0 -0
  111. data/spec/fixtures/{functions → library}/tint.scss +0 -0
  112. data/spec/fixtures/library/triangle.scss +9 -0
  113. data/spec/fixtures/{addons → library}/word-wrap.scss +0 -0
  114. data/spec/fixtures/{functions → utilities}/assign-inputs.scss +0 -0
  115. data/spec/fixtures/{settings → utilities}/bourbon-get-setting.scss +0 -0
  116. data/spec/fixtures/{functions → utilities}/collapse-directionals.scss +0 -0
  117. data/spec/fixtures/{helpers → utilities}/directional-values.scss +0 -0
  118. data/spec/fixtures/{functions → utilities}/font-source-declaration.scss +0 -0
  119. data/spec/fixtures/{functions → utilities}/unpack.scss +0 -0
  120. data/spec/fixtures/{functions → validators}/contains.scss +0 -0
  121. data/spec/fixtures/{functions → validators}/is-length.scss +0 -0
  122. data/spec/fixtures/{functions → validators}/is-light.scss +1 -1
  123. data/spec/fixtures/{functions → validators}/is-number.scss +0 -0
  124. data/spec/fixtures/{functions → validators}/is-size.scss +0 -0
  125. metadata +191 -187
  126. data/lib/bourbon/engine.rb +0 -5
  127. data/lib/tasks/install.rake +0 -20
@@ -10,8 +10,10 @@
10
10
  /// is-light($color)
11
11
  ///
12
12
  /// @return {boolean}
13
+ ///
14
+ /// @access private
13
15
 
14
- @function is-light($hex-color) {
16
+ @function _is-light($hex-color) {
15
17
  $-local-red: red(rgba($hex-color, 1));
16
18
  $-local-green: green(rgba($hex-color, 1));
17
19
  $-local-blue: blue(rgba($hex-color, 1));
@@ -7,10 +7,11 @@ end
7
7
 
8
8
  Then /^the sass directories(?: with "([^"]+)" prefix)? should have been generated$/ do |prefix|
9
9
  sass_directories = [
10
- "bourbon/addons",
11
10
  "bourbon/helpers",
12
- "bourbon/functions",
11
+ "bourbon/library",
13
12
  "bourbon/settings",
13
+ "bourbon/utilities",
14
+ "bourbon/validators",
14
15
  ]
15
16
  sass_directories.map!{ |directory| bourbon_path(prefix, directory) }
16
17
  check_directory_presence(sass_directories, true)
@@ -1,20 +1,3 @@
1
1
  require "bourbon/generator"
2
-
3
- module Bourbon
4
- if defined?(Rails) && defined?(Rails::Engine)
5
- class Engine < ::Rails::Engine
6
- require "bourbon/engine"
7
- end
8
-
9
- module Rails
10
- class Railtie < ::Rails::Railtie
11
- rake_tasks do
12
- load "tasks/install.rake"
13
- end
14
- end
15
- end
16
- else
17
- bourbon_path = File.expand_path("../../core", __FILE__)
18
- ENV["SASS_PATH"] = [ENV["SASS_PATH"], bourbon_path].compact.join(File::PATH_SEPARATOR)
19
- end
20
- end
2
+ bourbon_path = File.expand_path("../../core", __FILE__)
3
+ ENV["SASS_PATH"] = File.join([ENV["SASS_PATH"], bourbon_path].compact)
@@ -1,3 +1,3 @@
1
1
  module Bourbon
2
- VERSION = "5.0.0.beta.1"
2
+ VERSION = "5.0.0.beta.2"
3
3
  end
@@ -1,7 +1,17 @@
1
1
  {
2
- "name": "bourbon",
3
- "version": "5.0.0-beta.1",
2
+ "author": {
3
+ "name": "thoughtbot",
4
+ "url": "http://thoughtbot.com"
5
+ },
6
+ "bugs": {
7
+ "url": "https://github.com/thoughtbot/bourbon/issues"
8
+ },
4
9
  "description": "A simple and lightweight mixin library for Sass.",
10
+ "eyeglass": {
11
+ "needs": "*",
12
+ "exports": "eyeglass-exports.js"
13
+ },
14
+ "homepage": "http://bourbon.io",
5
15
  "keywords": [
6
16
  "css",
7
17
  "eyeglass-module",
@@ -9,25 +19,15 @@
9
19
  "sass",
10
20
  "scss"
11
21
  ],
12
- "homepage": "http://bourbon.io",
13
- "bugs": {
14
- "url": "https://github.com/thoughtbot/bourbon/issues"
15
- },
16
- "eyeglass": {
17
- "needs": "*",
18
- "exports": "eyeglass-exports.js"
19
- },
20
22
  "license": "MIT",
21
- "author": {
22
- "name": "thoughtbot",
23
- "url": "http://thoughtbot.com"
24
- },
25
23
  "main": "index.js",
24
+ "name": "bourbon",
26
25
  "repository": {
27
26
  "type": "git",
28
27
  "url": "https://github.com/thoughtbot/bourbon.git"
29
28
  },
30
29
  "scripts": {
31
- "test": "echo \"No test specified\""
32
- }
30
+ "test": "bundle exec rake"
31
+ },
32
+ "version": "5.0.0-beta.2"
33
33
  }
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "border-color" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/border-color")
5
+ ParserSupport.parse_file("library/border-color")
6
6
  end
7
7
 
8
8
  context "called with one color" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "border-radius" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/border-radius")
5
+ ParserSupport.parse_file("library/border-radius")
6
6
  end
7
7
 
8
8
  context "called with one argument" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "border-style" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/border-style")
5
+ ParserSupport.parse_file("library/border-style")
6
6
  end
7
7
 
8
8
  context "called with one style" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "border-width" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/border-width")
5
+ ParserSupport.parse_file("library/border-width")
6
6
  end
7
7
 
8
8
  context "called with one color" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "buttons" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/buttons")
5
+ ParserSupport.parse_file("library/buttons")
6
6
 
7
7
  @buttons_list = %w(
8
8
  button
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "clearfix" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/clearfix")
5
+ ParserSupport.parse_file("library/clearfix")
6
6
  end
7
7
 
8
8
  context "called on element" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "contrast-switch" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/contrast-switch")
5
+ ParserSupport.parse_file("library/contrast-switch")
6
6
  end
7
7
 
8
8
  context "called with a light base color" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "ellipsis" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/ellipsis")
5
+ ParserSupport.parse_file("library/ellipsis")
6
6
  end
7
7
 
8
8
  context "called on element" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "font-stacks" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/font-stacks")
5
+ ParserSupport.parse_file("library/font-stacks")
6
6
  end
7
7
 
8
8
  context "stacks used in variable" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "hide-text" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/hide-text")
5
+ ParserSupport.parse_file("library/hide-text")
6
6
  end
7
7
 
8
8
  context "called on element" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "hide-visually" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/hide-visually")
5
+ ParserSupport.parse_file("library/hide-visually")
6
6
  end
7
7
 
8
8
  context "called on element" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "margin" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/margin")
5
+ ParserSupport.parse_file("library/margin")
6
6
  end
7
7
 
8
8
  context "called with one size" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "modular-scale" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/modular-scale")
5
+ ParserSupport.parse_file("library/modular-scale")
6
6
  end
7
7
 
8
8
  context "called with arguments (1, $value: 2em)" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "padding" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/padding")
5
+ ParserSupport.parse_file("library/padding")
6
6
  end
7
7
 
8
8
  context "called with one size" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "position" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/position")
5
+ ParserSupport.parse_file("library/position")
6
6
  end
7
7
 
8
8
  context "called with one size" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "shade" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("functions/shade")
5
+ ParserSupport.parse_file("library/shade")
6
6
  end
7
7
 
8
8
  context "called on white" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "size" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/size")
5
+ ParserSupport.parse_file("library/size")
6
6
  end
7
7
 
8
8
  context "called with one size" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "strip-unit" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("functions/strip-unit")
5
+ ParserSupport.parse_file("library/strip-unit")
6
6
  end
7
7
 
8
8
  context "called with px" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "text-inputs" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/text-inputs")
5
+ ParserSupport.parse_file("library/text-inputs")
6
6
 
7
7
  @inputs_list = %w(
8
8
  [type='color']
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "tint" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("functions/tint")
5
+ ParserSupport.parse_file("library/tint")
6
6
  end
7
7
 
8
8
  context "called on white" do
@@ -0,0 +1,31 @@
1
+ require "spec_helper"
2
+
3
+ describe "triangle" do
4
+ before(:all) do
5
+ ParserSupport.parse_file("library/triangle")
6
+ end
7
+
8
+ context "called with defaults" do
9
+ it "outputs the properties" do
10
+ ruleset = "border-style: solid; " +
11
+ "height: 0; " +
12
+ "width: 0; " +
13
+ "border-color: transparent transparent currentColor; " +
14
+ "border-width: 0 0.5rem 0.5rem;"
15
+
16
+ expect(".triangle").to have_ruleset(ruleset)
17
+ end
18
+ end
19
+
20
+ context "called with arguments" do
21
+ it "outputs the properties" do
22
+ ruleset = "border-style: solid; " +
23
+ "height: 0; " +
24
+ "width: 0; " +
25
+ "border-color: #b25c9c transparent transparent; " +
26
+ "border-width: 20px 15px 0;"
27
+
28
+ expect(".triangle--with-arguments").to have_ruleset(ruleset)
29
+ end
30
+ end
31
+ end
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "word-wrap" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("addons/word-wrap")
5
+ ParserSupport.parse_file("library/word-wrap")
6
6
  end
7
7
 
8
8
  context "called on element" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "assign-inputs" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("functions/assign-inputs")
5
+ ParserSupport.parse_file("utilities/assign-inputs")
6
6
  @text_inputs_list = [
7
7
  "[type='password']",
8
8
  "[type='text']",
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "_bourbon-get-setting" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("settings/bourbon-get-setting")
5
+ ParserSupport.parse_file("utilities/bourbon-get-setting")
6
6
  end
7
7
 
8
8
  context "gets the modular-scale-base setting" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "collapse-directionals" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("functions/collapse-directionals")
5
+ ParserSupport.parse_file("utilities/collapse-directionals")
6
6
  end
7
7
 
8
8
  context "collapse-directionals" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "directional-values" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("helpers/directional-values")
5
+ ParserSupport.parse_file("utilities/directional-values")
6
6
  end
7
7
 
8
8
  context "directional-property" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "font-source-declaration" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("functions/font-source-declaration")
5
+ ParserSupport.parse_file("utilities/font-source-declaration")
6
6
  end
7
7
 
8
8
  context "called with pipeline" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "unpack" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("functions/unpack")
5
+ ParserSupport.parse_file("utilities/unpack")
6
6
  end
7
7
 
8
8
  context "single" do
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "contains" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("functions/contains")
5
+ ParserSupport.parse_file("validators/contains")
6
6
  end
7
7
 
8
8
  context "called on array with single item" do