bourbon 4.2.1 → 4.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.hound.yml +1 -0
  3. data/.npmignore +1 -0
  4. data/.scss-lint.yml +2 -163
  5. data/.travis.yml +7 -0
  6. data/README.md +18 -5
  7. data/app/assets/stylesheets/_bourbon.scss +1 -1
  8. data/app/assets/stylesheets/css3/_flex-box.scss +2 -4
  9. data/app/assets/stylesheets/helpers/_convert-units.scss +8 -2
  10. data/bower.json +1 -1
  11. data/features/step_definitions/bourbon_steps.rb +1 -1
  12. data/lib/bourbon/version.rb +1 -1
  13. data/package.json +1 -1
  14. data/spec/bourbon/addons/border_color_spec.rb +51 -0
  15. data/spec/bourbon/addons/border_radius_spec.rb +25 -0
  16. data/spec/bourbon/addons/border_style_spec.rb +51 -0
  17. data/spec/bourbon/addons/border_width_spec.rb +51 -0
  18. data/spec/bourbon/addons/buttons_spec.rb +52 -0
  19. data/spec/bourbon/addons/clearfix_spec.rb +18 -0
  20. data/spec/bourbon/addons/ellipsis_spec.rb +20 -0
  21. data/spec/bourbon/addons/font_stacks_spec.rb +25 -0
  22. data/spec/bourbon/addons/hide_text_spec.rb +17 -0
  23. data/spec/bourbon/addons/margin_spec.rb +51 -0
  24. data/spec/bourbon/addons/padding_spec.rb +51 -0
  25. data/spec/bourbon/addons/position_spec.rb +67 -0
  26. data/spec/bourbon/addons/retina_image_spec.rb +57 -0
  27. data/spec/bourbon/addons/size_spec.rb +31 -0
  28. data/spec/bourbon/addons/text_inputs_spec.rb +63 -0
  29. data/spec/bourbon/addons/triangle_spec.rb +32 -0
  30. data/spec/bourbon/addons/word_wrap_spec.rb +29 -0
  31. data/spec/bourbon/css3/font_face_spec.rb +45 -0
  32. data/spec/bourbon/css3/hidpi_media_query_spec.rb +23 -0
  33. data/spec/bourbon/helpers/directional_values_spec.rb +39 -0
  34. data/spec/bourbon/helpers/font_source_declaration_spec.rb +29 -0
  35. data/spec/bourbon/helpers/str_to_num_spec.rb +25 -0
  36. data/spec/fixtures/addons/border-color.scss +26 -0
  37. data/spec/fixtures/addons/border-radius.scss +17 -0
  38. data/spec/fixtures/addons/border-style.scss +21 -0
  39. data/spec/fixtures/addons/border-width.scss +21 -0
  40. data/spec/fixtures/addons/buttons.scss +17 -0
  41. data/spec/fixtures/addons/clearfix.scss +5 -0
  42. data/spec/fixtures/addons/ellipsis.scss +5 -0
  43. data/spec/fixtures/addons/font-stacks.scss +21 -0
  44. data/spec/fixtures/addons/hide-text.scss +5 -0
  45. data/spec/fixtures/addons/margin.scss +21 -0
  46. data/spec/fixtures/addons/padding.scss +21 -0
  47. data/spec/fixtures/addons/position.scss +25 -0
  48. data/spec/fixtures/addons/retina-image.scss +21 -0
  49. data/spec/fixtures/addons/size.scss +13 -0
  50. data/spec/fixtures/addons/text-inputs.scss +17 -0
  51. data/spec/fixtures/addons/triangle.scss +9 -0
  52. data/spec/fixtures/addons/word-wrap.scss +9 -0
  53. data/spec/fixtures/css3/font-face.scss +6 -0
  54. data/spec/fixtures/css3/hidpi-media-query.scss +13 -0
  55. data/spec/fixtures/helpers/convert-units.scss +4 -4
  56. data/spec/fixtures/helpers/directional-values.scss +29 -0
  57. data/spec/fixtures/helpers/font-source-declaration.scss +10 -0
  58. data/spec/fixtures/helpers/str-to-num.scss +13 -0
  59. data/spec/support/matchers/have_ruleset.rb +20 -0
  60. data/spec/support/sass_support.rb +1 -1
  61. metadata +93 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 151abcb53a0cd21cfa4337132151d9e39b2abd61
4
- data.tar.gz: f20c75d60c7574ae94d42f8b7af3dedf8b92ef73
3
+ metadata.gz: 761ff8c4792ae71d9a87918e2663683824f10b2c
4
+ data.tar.gz: 00d5c800159752637caabc5c06a8f89d1c848e8f
5
5
  SHA512:
6
- metadata.gz: 793090861adf2e65b284beea77e1757083d95be8225c02da774faa4317c4ffce2bd4989377971f2f1234268ff212d600023e1e5c6c092ce953ef854e1e587ea3
7
- data.tar.gz: dc086af8fabb7a568fc590a10a00f8eab3f863ab6156b24fbe30090dbe9079bbce7abb203ebf979f907ac756adbef9888b2cb87c9e58af6c1d5ed0807994acb8
6
+ metadata.gz: 62cb326069ad6f8f7a93995e487504b1b06b0d67a9682657e1f86225e4e15d7228d8534376b8ff3f7eee4c9f8a2f70fe954689811ecb9156df9cb4f66a187461
7
+ data.tar.gz: a41e3ae3d95229e8333d6ddca2675c07e430e5f7dfec344a594a943b02f524dba7a7f37137f2aa00d1e0078d7d634b5f4d49b585f13821168a6282c54ee9a60c
data/.hound.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  ruby:
2
2
  enabled: true
3
3
  scss:
4
+ config_file: .scss-lint.yml
4
5
  enabled: true
data/.npmignore CHANGED
@@ -1,5 +1,6 @@
1
1
  .gitignore
2
2
  .hound.yml
3
+ .sass-cache
3
4
  _site
4
5
  bin/
5
6
  bourbon.gemspec
@@ -1,175 +1,14 @@
1
1
  scss_files: "app/assets/stylesheets/**/*.scss"
2
-
3
2
  linters:
4
- BangFormat:
5
- enabled: true
6
- space_before_bang: true
7
- space_after_bang: false
8
-
9
3
  BorderZero:
10
4
  enabled: false
11
-
12
- ColorKeyword:
13
- enabled: true
14
- severity: warning
15
-
16
- Comment:
17
- enabled: true
18
-
19
- DebugStatement:
20
- enabled: true
21
-
22
- DeclarationOrder:
23
- enabled: true
24
-
25
- DuplicateProperty:
26
- enabled: true
27
-
28
- ElsePlacement:
29
- enabled: true
30
- style: same_line
31
-
32
- EmptyLineBetweenBlocks:
33
- enabled: true
34
- ignore_single_line_blocks: true
35
-
36
- EmptyRule:
37
- enabled: true
38
-
39
- FinalNewline:
40
- enabled: true
41
- present: true
42
-
43
- HexLength:
5
+ ColorVariable:
44
6
  enabled: false
45
- style: short
46
-
47
- HexNotation:
48
- enabled: true
49
- style: lowercase
50
-
51
- HexValidation:
52
- enabled: true
53
-
54
- IdWithExtraneousSelector:
55
- enabled: true
56
-
57
- ImportPath:
58
- enabled: true
59
- leading_underscore: false
60
- filename_extension: false
61
-
62
- Indentation:
63
- enabled: true
64
- character: space
65
- width: 2
66
-
67
7
  LeadingZero:
68
8
  enabled: true
69
9
  style: include_zero
70
-
71
- MergeableSelector:
72
- enabled: true
73
- force_nesting: true
74
-
75
- NameFormat:
76
- enabled: true
77
- convention: hyphenated_lowercase
78
-
79
- NestingDepth:
80
- enabled: true
81
- max_depth: 4
82
- severity: warning
83
-
84
- PlaceholderInExtend:
85
- enabled: false
86
-
87
- PropertySortOrder:
88
- enabled: true
89
- ignore_unspecified: false
90
- severity: warning
91
-
92
- PropertySpelling:
93
- enabled: true
94
- extra_properties: []
95
-
96
- QualifyingElement:
97
- enabled: true
98
- allow_with_attribute: false
99
- allow_with_class: false
100
- allow_with_id: false
101
- severity: warning
102
-
103
- SelectorDepth:
104
- enabled: true
105
- max_depth: 2
106
- severity: warning
107
-
108
10
  SelectorFormat:
109
- enabled: true
110
- convention: hyphenated_lowercase
111
-
112
- Shorthand:
113
- enabled: true
114
- severity: warning
115
-
116
- SingleLinePerProperty:
117
- enabled: true
118
- allow_single_line_rule_sets: true
119
-
120
- SingleLinePerSelector:
121
- enabled: true
122
-
123
- SpaceAfterComma:
124
- enabled: true
125
-
126
- SpaceAfterPropertyColon:
127
- enabled: true
128
- style: one_space
129
-
130
- SpaceAfterPropertyName:
131
- enabled: true
132
-
133
- SpaceBeforeBrace:
134
- enabled: true
135
- style: space
136
- allow_single_line_padding: false
137
-
138
- SpaceBetweenParens:
139
- enabled: true
140
- spaces: 0
141
-
11
+ enabled: false
142
12
  StringQuotes:
143
13
  enabled: true
144
14
  style: double_quotes
145
-
146
- TrailingSemicolon:
147
- enabled: true
148
-
149
- TrailingZero:
150
- enabled: false
151
-
152
- UnnecessaryMantissa:
153
- enabled: true
154
-
155
- UnnecessaryParentReference:
156
- enabled: true
157
-
158
- UrlFormat:
159
- enabled: true
160
-
161
- UrlQuotes:
162
- enabled: true
163
-
164
- VendorPrefixes:
165
- enabled: true
166
- identifier_list: bourbon
167
- include: []
168
- exclude: []
169
-
170
- ZeroUnit:
171
- enabled: true
172
- severity: warning
173
-
174
- Compass::*:
175
- enabled: false
@@ -0,0 +1,7 @@
1
+ branches:
2
+ except:
3
+ - gh-pages
4
+ language: ruby
5
+ notifications:
6
+ email: false
7
+ rvm: 2.2.1
data/README.md CHANGED
@@ -15,6 +15,9 @@ The mixins contain vendor specific prefixes for all CSS3 properties for support
15
15
  - **[Changelog](https://github.com/thoughtbot/bourbon/releases)**
16
16
  - **[Issues & Bugs](https://github.com/thoughtbot/bourbon/issues)**
17
17
 
18
+ Follow the [@bourbonsass](https://twitter.com/bourbonsass) Twitter account
19
+ for updates.
20
+
18
21
  ## Requirements
19
22
 
20
23
  - [Sass](https://github.com/sass/sass) 3.4+ or [LibSass](https://github.com/sass/libsass) 3.1+
@@ -116,12 +119,22 @@ For command line help, visit our wiki page on Bourbon’s [command line interfac
116
119
 
117
120
  Also check out [Proteus](https://github.com/thoughtbot/proteus), a collection of useful starter kits to help you prototype faster. Each kit comes with Bourbon, Neat and Bitters out-of-the-box.
118
121
 
119
- ## Credits
122
+ ## License
120
123
 
121
- [![thoughtbot](http://images.thoughtbot.com/bourbon/thoughtbot-logo.svg)](http://thoughtbot.com)
124
+ Copyright © 2011–2015 [thoughtbot, inc](http://thoughtbot.com).
125
+ Bourbon is free software,
126
+ and may be redistributed under the terms specified in the [license](LICENSE.md).
122
127
 
123
- Bourbon is maintained and funded by [thoughtbot, inc](http://thoughtbot.com). Tweet your questions or suggestions to [@bourbonsass](https://twitter.com/bourbonsass) and while you’re at it follow us too.
128
+ ## About thoughtbot
124
129
 
125
- ## License
130
+ [![thoughtbot](http://thoughtbot.github.io/images/signature.svg)][hire]
131
+
132
+ Bourbon is maintained and funded by thoughtbot, inc.
133
+ The names and logos for thoughtbot are trademarks of thoughtbot, inc.
134
+
135
+ We love open source software!
136
+ See [our other projects][community] or
137
+ [hire us][hire] to design, develop, and grow your product.
126
138
 
127
- Copyright © 2011–2015 [thoughtbot, inc](http://thoughtbot.com). Bourbon is free software, and may be redistributed under the terms specified in the [license](LICENSE.md).
139
+ [community]: https://thoughtbot.com/community?utm_source=github
140
+ [hire]: https://thoughtbot.com/hire-us?utm_source=github
@@ -1,4 +1,4 @@
1
- // Bourbon 4.2.1
1
+ // Bourbon 4.2.2
2
2
  // http://bourbon.io
3
3
  // Copyright 2011-2015 thoughtbot, inc.
4
4
  // MIT License
@@ -114,7 +114,7 @@
114
114
  // Alt values.
115
115
  $value-2009: $value;
116
116
  $value-2011: $value;
117
- $direction: "normal";
117
+ $direction: normal;
118
118
 
119
119
  @if $value == row {
120
120
  $value-2009: horizontal;
@@ -130,9 +130,7 @@
130
130
 
131
131
  // 2009
132
132
  @include prefixer(box-orient, $value-2009, webkit moz spec);
133
- @if $direction == "reverse" {
134
- @include prefixer(box-direction, $direction, webkit moz spec);
135
- }
133
+ @include prefixer(box-direction, $direction, webkit moz spec);
136
134
 
137
135
  // 2012
138
136
  @include prefixer(flex-direction, $value, webkit moz spec);
@@ -3,13 +3,19 @@
3
3
  // Source: http://sassmeister.com/gist/9647408
4
4
  //************************************************************************//
5
5
  @function _convert-units($number, $unit) {
6
- $strings: "px" "cm" "mm" "%" "ch" "pica" "in" "em" "rem" "pt" "pc" "ex" "vw" "vh" "vmin" "vmax", "deg", "rad", "grad", "turn";
7
- $units: 1px 1cm 1mm 1% 1ch 1pica 1in 1em 1rem 1pt 1pc 1ex 1vw 1vh 1vmin 1vmax, 1deg, 1rad, 1grad, 1turn;
6
+ $strings: "px", "cm", "mm", "%", "ch", "pica", "in", "em", "rem", "pt", "pc", "ex", "vw", "vh", "vmin", "vmax", "deg", "rad", "grad", "turn";
7
+ $units: 1px, 1cm, 1mm, 1%, 1ch, 1pica, 1in, 1em, 1rem, 1pt, 1pc, 1ex, 1vw, 1vh, 1vmin, 1vmax, 1deg, 1rad, 1grad, 1turn;
8
8
  $index: index($strings, $unit);
9
9
 
10
10
  @if not $index {
11
11
  @warn "Unknown unit `#{$unit}`.";
12
12
  @return false;
13
13
  }
14
+
15
+ @if type-of($number) != "number" {
16
+ @warn "`#{$number} is not a number`";
17
+ @return false;
18
+ }
19
+
14
20
  @return $number * nth($units, $index);
15
21
  }
data/bower.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bourbon",
3
3
  "description": "A simple and lightweight mixin library for Sass.",
4
- "version": "4.2.1",
4
+ "version": "4.2.2",
5
5
  "main": "app/assets/stylesheets/_bourbon.scss",
6
6
  "license": "MIT",
7
7
  "ignore": [
@@ -20,5 +20,5 @@ Then /^bourbon should not have been generated$/ do
20
20
  end
21
21
 
22
22
  Then /^the output should contain the current version of Bourbon$/ do
23
- step %(the output should contain exactly "Bourbon #{Bourbon::VERSION}\n")
23
+ assert_exact_output("Bourbon #{Bourbon::VERSION}\n", all_output)
24
24
  end
@@ -1,3 +1,3 @@
1
1
  module Bourbon
2
- VERSION = "4.2.1"
2
+ VERSION = "4.2.2"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bourbon",
3
- "version": "4.2.1",
3
+ "version": "4.2.2",
4
4
  "description": "A simple and lightweight mixin library for Sass.",
5
5
  "keywords": [
6
6
  "css",
@@ -0,0 +1,51 @@
1
+ require "spec_helper"
2
+
3
+ describe "border-color" do
4
+ before(:all) do
5
+ ParserSupport.parse_file("addons/border-color")
6
+ end
7
+
8
+ context "called with one color" do
9
+ it "applies same color to all sides" do
10
+ rule = "border-color: #ff0000"
11
+
12
+ expect(".border-color-all").to have_rule(rule)
13
+ end
14
+ end
15
+
16
+ context "called with two colors" do
17
+ it "applies to alternating sides" do
18
+ rule = "border-color: #00ff00 #0000ff"
19
+
20
+ expect(".border-color-alternate").to have_rule(rule)
21
+ end
22
+ end
23
+
24
+ context "called with three colors" do
25
+ it "applies second color to left and right" do
26
+ rule = "border-color: #ff0000 #00ff00 #0000ff"
27
+
28
+ expect(".border-color-implied-left").to have_rule(rule)
29
+ end
30
+ end
31
+
32
+ context "called with four colors" do
33
+ it "applies different colors to all sides" do
34
+ rule = "border-color: #0000ff #00ff00 #ff0000 #ffff00"
35
+
36
+ expect(".border-color-explicit").to have_rule(rule)
37
+ end
38
+ end
39
+
40
+ context "called with null values" do
41
+ it "writes rules for other three" do
42
+ ruleset = "border-top-color: #00ff00; " +
43
+ "border-right-color: #ffff00; " +
44
+ "border-left-color: #0000ff;"
45
+ bad_rule = "border-bottom-color: null;"
46
+
47
+ expect(".border-color-false-third").to have_ruleset(ruleset)
48
+ expect(".border-color-false-third").to_not have_rule(bad_rule)
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,25 @@
1
+ require "spec_helper"
2
+
3
+ describe "border-radius" do
4
+ before(:all) do
5
+ ParserSupport.parse_file("addons/border-radius")
6
+ end
7
+
8
+ context "called with one argument" do
9
+ it "applies to correct sides" do
10
+ top = "border-top-left-radius: 1em; " +
11
+ "border-top-right-radius: 1em;"
12
+ left = "border-bottom-left-radius: 2em; " +
13
+ "border-top-left-radius: 2em;"
14
+ right = "border-bottom-right-radius: 3em; " +
15
+ "border-top-right-radius: 3em;"
16
+ bottom = "border-bottom-left-radius: 4em; " +
17
+ "border-bottom-right-radius: 4em;"
18
+
19
+ expect(".border-top-radius").to have_ruleset(top)
20
+ expect(".border-left-radius").to have_ruleset(left)
21
+ expect(".border-right-radius").to have_ruleset(right)
22
+ expect(".border-bottom-radius").to have_ruleset(bottom)
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,51 @@
1
+ require "spec_helper"
2
+
3
+ describe "border-style" do
4
+ before(:all) do
5
+ ParserSupport.parse_file("addons/border-style")
6
+ end
7
+
8
+ context "called with one style" do
9
+ it "applies same style to all sides" do
10
+ rule = "border-style: solid"
11
+
12
+ expect(".border-style-all").to have_rule(rule)
13
+ end
14
+ end
15
+
16
+ context "called with two styles" do
17
+ it "applies to alternating sides" do
18
+ rule = "border-style: dotted dashed"
19
+
20
+ expect(".border-style-alternate").to have_rule(rule)
21
+ end
22
+ end
23
+
24
+ context "called with three styles" do
25
+ it "applies second style to left and right" do
26
+ rule = "border-style: dashed double solid"
27
+
28
+ expect(".border-style-implied-left").to have_rule(rule)
29
+ end
30
+ end
31
+
32
+ context "called with four styles" do
33
+ it "applies different styles to all sides" do
34
+ rule = "border-style: dotted groove ridge none"
35
+
36
+ expect(".border-style-explicit").to have_rule(rule)
37
+ end
38
+ end
39
+
40
+ context "called with null values" do
41
+ it "writes rules for other three" do
42
+ ruleset = "border-top-style: inset; " +
43
+ "border-right-style: none; " +
44
+ "border-left-style: double;"
45
+ bad_rule = "border-bottom-style: null;"
46
+
47
+ expect(".border-style-false-third").to have_ruleset(ruleset)
48
+ expect(".border-style-false-third").to_not have_rule(bad_rule)
49
+ end
50
+ end
51
+ end