bourbon 6.0.0 → 7.0.0

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 (37) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +6 -16
  3. data/.hound.yml +1 -0
  4. data/.tool-versions +2 -2
  5. data/CHANGELOG.md +20 -0
  6. data/LICENSE.md +1 -1
  7. data/README.md +1 -12
  8. data/RELEASING.md +8 -9
  9. data/bourbon.gemspec +3 -2
  10. data/core/_bourbon.scss +2 -2
  11. data/core/bourbon/library/_contrast-switch.scss +3 -3
  12. data/core/bourbon/library/_font-face.scss +3 -3
  13. data/core/bourbon/library/_hide-visually.scss +1 -1
  14. data/core/bourbon/library/_overflow-wrap.scss +1 -4
  15. data/core/bourbon/library/_position.scss +4 -4
  16. data/core/bourbon/library/_shade.scss +1 -1
  17. data/core/bourbon/library/_size.scss +2 -2
  18. data/core/bourbon/library/_tint.scss +1 -1
  19. data/core/bourbon/library/_triangle.scss +2 -2
  20. data/core/bourbon/settings/_settings.scss +4 -4
  21. data/core/bourbon/utilities/_font-source-declaration.scss +10 -9
  22. data/core/bourbon/validators/_is-length.scss +8 -3
  23. data/core/bourbon/validators/_is-size.scss +1 -1
  24. data/lib/bourbon/version.rb +1 -1
  25. data/package-lock.json +3305 -118
  26. data/package.json +5 -3
  27. data/spec/bourbon/library/font_face_spec_1.rb +2 -2
  28. data/spec/bourbon/library/font_face_spec_2.rb +2 -3
  29. data/spec/bourbon/library/font_face_spec_3.rb +1 -1
  30. data/spec/bourbon/utilities/font_source_declaration_spec.rb +4 -10
  31. data/spec/bourbon/validators/is_length_spec.rb +12 -0
  32. data/spec/fixtures/utilities/font-source-declaration.scss +1 -1
  33. data/spec/fixtures/validators/is-length.scss +8 -0
  34. data/spec/support/sass_support.rb +2 -2
  35. metadata +22 -12
  36. data/spec/bourbon/library/font_face_spec_4.rb +0 -17
  37. data/spec/fixtures/library/font-face-4.scss +0 -7
@@ -8,8 +8,9 @@
8
8
  },
9
9
  "description": "A lightweight Sass tool set.",
10
10
  "devDependencies": {
11
- "@thoughtbot/stylelint-config": "^1.0.0",
12
- "stylelint": "^10.0.1"
11
+ "@thoughtbot/stylelint-config": "1.1.0",
12
+ "sassdoc": "^2.5.0",
13
+ "stylelint": "10.1.0"
13
14
  },
14
15
  "eyeglass": {
15
16
  "needs": "*",
@@ -32,8 +33,9 @@
32
33
  "url": "https://github.com/thoughtbot/bourbon.git"
33
34
  },
34
35
  "scripts": {
36
+ "sassdoc": "npx sassdoc core/ --parse --verbose --strict",
35
37
  "stylelint": "npx stylelint 'core/**/*.scss'",
36
38
  "test": "bundle exec rake"
37
39
  },
38
- "version": "6.0.0"
40
+ "version": "7.0.0"
39
41
  }
@@ -2,13 +2,13 @@ require "spec_helper"
2
2
 
3
3
  describe "font-face" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("css3/font-face-1")
5
+ ParserSupport.parse_file("library/font-face-1")
6
6
  end
7
7
 
8
8
  context "called with defaults" do
9
9
  it "outputs defaults" do
10
10
  ruleset = 'font-family: "source-sans-pro"; ' +
11
- '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");'
11
+ '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");'
12
12
 
13
13
  expect("@font-face").to have_ruleset(ruleset)
14
14
  end
@@ -2,15 +2,14 @@ require "spec_helper"
2
2
 
3
3
  describe "font-face" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("css3/font-face-5")
5
+ ParserSupport.parse_file("library/font-face-5")
6
6
  end
7
7
 
8
8
  context "called with additional CSS rules" do
9
9
  it "outputs defaults with additional content" do
10
10
  ruleset = 'font-family: "calibre"; ' +
11
11
  'src: url("fonts/calibre.woff2") format("woff2"), ' +
12
- 'url("fonts/calibre.woff") format("woff"), ' +
13
- 'url("fonts/calibre.ttf") format("truetype"); ' +
12
+ 'url("fonts/calibre.woff") format("woff"); ' +
14
13
  "font-style: normal;" +
15
14
  "font-weight: 600;" +
16
15
  "unicode-range: U+26;"
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  describe "font-face" do
4
4
  before(:all) do
5
- ParserSupport.parse_file("css3/font-face-3")
5
+ ParserSupport.parse_file("library/font-face-3")
6
6
  end
7
7
 
8
8
  context "called with defaults" do
@@ -7,22 +7,16 @@ describe "font-source-declaration" do
7
7
 
8
8
  context "called with pipeline" do
9
9
  it "returns pipeline path" do
10
- rule = 'src: font-url("b.eot?#iefix") format("embedded-opentype"), ' +
11
- 'font-url("b.woff2") format("woff2"), ' +
12
- 'font-url("b.woff") format("woff"), ' +
13
- 'font-url("b.ttf") format("truetype"), ' +
14
- 'font-url("b.svg#a") format("svg")'
10
+ rule = 'src: font-url("b.woff2") format("woff2"), ' +
11
+ 'font-url("b.woff") format("woff")'
15
12
  expect(".has-pipeline").to have_rule(rule)
16
13
  end
17
14
  end
18
15
 
19
16
  context "called with no pipeline" do
20
17
  it "does not return pipeline path" do
21
- rule = 'src: url("b.eot?#iefix") format("embedded-opentype"), ' +
22
- 'url("b.woff2") format("woff2"), ' +
23
- 'url("b.woff") format("woff"), ' +
24
- 'url("b.ttf") format("truetype"), ' +
25
- 'url("b.svg#a") format("svg")'
18
+ rule = 'src: url("b.woff2") format("woff2"), ' +
19
+ 'url("b.woff") format("woff")'
26
20
  expect(".no-pipeline").to have_rule(rule)
27
21
  end
28
22
  end
@@ -35,6 +35,18 @@ describe "is-length" do
35
35
  end
36
36
  end
37
37
 
38
+ context "parses custom properties" do
39
+ it "returns true" do
40
+ expect(".var").to have_rule("color: #fff")
41
+ end
42
+ end
43
+
44
+ context "parses environment variables" do
45
+ it "returns true" do
46
+ expect(".env").to have_rule("color: #fff")
47
+ end
48
+ end
49
+
38
50
  context "checks if strings can be represented as a length" do
39
51
  it "returns false" do
40
52
  expect(".string").not_to have_rule("color: #fff")
@@ -1,6 +1,6 @@
1
1
  @import "setup";
2
2
 
3
- $file-formats: ("eot", "woff2", "woff", "ttf", "svg");
3
+ $file-formats: ("woff2", "woff");
4
4
 
5
5
  .has-pipeline {
6
6
  src: _font-source-declaration("a", "b", true, $file-formats);
@@ -26,6 +26,14 @@
26
26
  @include color-length(calc(2em - 5px));
27
27
  }
28
28
 
29
+ .env {
30
+ @include color-length(env(safe-area-inset-top, 0));
31
+ }
32
+
33
+ .var {
34
+ @include color-length(var(--a-custom-property));
35
+ }
36
+
29
37
  .string {
30
38
  @include color-length("stringy");
31
39
  }
@@ -1,7 +1,7 @@
1
1
  module SassSupport
2
2
  def generate_css
3
- _mkdir("tmp")
4
- `sass -I . --update spec/fixtures:tmp --quiet`
3
+ FileUtils.mkdir("tmp")
4
+ `sass -I . spec/fixtures:tmp --update --precision=5 --sourcemap=none`
5
5
  end
6
6
 
7
7
  def clean_up
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bourbon
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Reuter
@@ -17,7 +17,7 @@ authors:
17
17
  autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
- date: 2019-07-10 00:00:00.000000000 Z
20
+ date: 2020-03-09 00:00:00.000000000 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: aruba
@@ -65,16 +65,16 @@ dependencies:
65
65
  name: rake
66
66
  requirement: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - "~>"
68
+ - - ">="
69
69
  - !ruby/object:Gem::Version
70
- version: '11.1'
70
+ version: '0'
71
71
  type: :development
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - "~>"
75
+ - - ">="
76
76
  - !ruby/object:Gem::Version
77
- version: '11.1'
77
+ version: '0'
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: rspec
80
80
  requirement: !ruby/object:Gem::Requirement
@@ -89,20 +89,34 @@ dependencies:
89
89
  - - "~>"
90
90
  - !ruby/object:Gem::Version
91
91
  version: '3.4'
92
+ - !ruby/object:Gem::Dependency
93
+ name: sass
94
+ requirement: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
92
106
  - !ruby/object:Gem::Dependency
93
107
  name: thor
94
108
  requirement: !ruby/object:Gem::Requirement
95
109
  requirements:
96
110
  - - "~>"
97
111
  - !ruby/object:Gem::Version
98
- version: '0.19'
112
+ version: '1.0'
99
113
  type: :runtime
100
114
  prerelease: false
101
115
  version_requirements: !ruby/object:Gem::Requirement
102
116
  requirements:
103
117
  - - "~>"
104
118
  - !ruby/object:Gem::Version
105
- version: '0.19'
119
+ version: '1.0'
106
120
  description: |2
107
121
  Bourbon is a library of pure Sass mixins and functions that are designed to
108
122
  make you a more efficient developer.
@@ -200,7 +214,6 @@ files:
200
214
  - spec/bourbon/library/font_face_spec_1.rb
201
215
  - spec/bourbon/library/font_face_spec_2.rb
202
216
  - spec/bourbon/library/font_face_spec_3.rb
203
- - spec/bourbon/library/font_face_spec_4.rb
204
217
  - spec/bourbon/library/font_stacks_spec.rb
205
218
  - spec/bourbon/library/hide_text_spec.rb
206
219
  - spec/bourbon/library/hide_visually_spec.rb
@@ -241,7 +254,6 @@ files:
241
254
  - spec/fixtures/library/font-face-1.scss
242
255
  - spec/fixtures/library/font-face-2.scss
243
256
  - spec/fixtures/library/font-face-3.scss
244
- - spec/fixtures/library/font-face-4.scss
245
257
  - spec/fixtures/library/font-stacks.scss
246
258
  - spec/fixtures/library/hide-text.scss
247
259
  - spec/fixtures/library/hide-visually.scss
@@ -317,7 +329,6 @@ test_files:
317
329
  - spec/bourbon/library/font_face_spec_1.rb
318
330
  - spec/bourbon/library/font_face_spec_2.rb
319
331
  - spec/bourbon/library/font_face_spec_3.rb
320
- - spec/bourbon/library/font_face_spec_4.rb
321
332
  - spec/bourbon/library/font_stacks_spec.rb
322
333
  - spec/bourbon/library/hide_text_spec.rb
323
334
  - spec/bourbon/library/hide_visually_spec.rb
@@ -358,7 +369,6 @@ test_files:
358
369
  - spec/fixtures/library/font-face-1.scss
359
370
  - spec/fixtures/library/font-face-2.scss
360
371
  - spec/fixtures/library/font-face-3.scss
361
- - spec/fixtures/library/font-face-4.scss
362
372
  - spec/fixtures/library/font-stacks.scss
363
373
  - spec/fixtures/library/hide-text.scss
364
374
  - spec/fixtures/library/hide-visually.scss
@@ -1,17 +0,0 @@
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
- 'src: url("/circular.woff2") format("woff2"), ' +
12
- 'url("/circular.svg#circular") format("svg");'
13
-
14
- expect("@font-face").to have_ruleset(ruleset)
15
- end
16
- end
17
- end
@@ -1,7 +0,0 @@
1
- @import "setup";
2
-
3
- @include font-face(
4
- "circular",
5
- "/circular",
6
- ("woff2", "svg")
7
- );