bourbon 6.0.0 → 7.2.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 +33 -3
  6. data/LICENSE.md +1 -1
  7. data/README.md +2 -13
  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 +25 -15
  36. data/spec/bourbon/library/font_face_spec_4.rb +0 -17
  37. data/spec/fixtures/library/font-face-4.scss +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a360bd2567304c4ae49d8e9d97716cd0d3d0abb88a8ede44aa5b68301b479c73
4
- data.tar.gz: 485fa493c958cb331bc76eecea565bce515bd36f6290d9c0c92df5baf8e4a343
3
+ metadata.gz: 9643a51902ac7ed19eb9ec07b9b4ce3edf9930dd8c9bf0614f0aa26015f5fc67
4
+ data.tar.gz: e062e0e0e72a55e3f707e6cb4aaa8e584a5b2e2db6673da4b95702ef4eeb34f4
5
5
  SHA512:
6
- metadata.gz: bc8960becf33315e221f8f71a6ceab0a94c186b92ae6c5b64e019469ba864837fb30e53af6465121fc39d47da848c2d5f2a1e1dedbe38ed02140252205716871
7
- data.tar.gz: 6e55d39b9925e3b745a2722b818469e6e8b37a295c833bf82c91c6d986fdb262ecbffb4ebef09b4c8cf55ff489290b12cfc19eef72c9645660db32dbdc88037d
6
+ metadata.gz: 3ff945a5d401efaaab35635c245e823b2085424adbcb8bddc23fb574d56fdc43af50f29f895c48774f99547c084c5e43ce4f9a8b4abcc4072adc32ea97cd2582
7
+ data.tar.gz: 25770a307ff47b90edf8a223c7601fd819917657104ddefc45fdc0f1ac0678f89fb97b25415569e8f962d90abbfc40eebfcfcc5ec58ca73f05a152d847632869
data/.circleci/config.yml CHANGED
@@ -1,34 +1,24 @@
1
1
  version: 2
2
-
3
2
  jobs:
4
3
  build:
5
4
  docker:
6
- - image: circleci/ruby:2.6.3-node
7
-
5
+ - image: circleci/ruby:2.6.5-node
8
6
  steps:
9
7
  - checkout
10
-
11
8
  - restore_cache:
12
9
  keys:
13
- - bourbon-{{ arch }}-{{ checksum "bourbon.gemspec" }}
14
-
10
+ - bourbon-bundle-v1-{{ checksum "bourbon.gemspec" }}
11
+ - bourbon-bundle-v1-
15
12
  - run:
16
- name: Install Ruby dependencies
13
+ name: Run Bundler
17
14
  command: bundle install --path vendor/bundle
18
-
19
- - run:
20
- name: Install SassDoc
21
- command: sudo npm install -g sassdoc@2.5.0
22
-
23
15
  - save_cache:
24
- key: bourbon-{{ arch }}-{{ checksum "bourbon.gemspec" }}
16
+ key: bourbon-bundle-v1-{{ checksum "bourbon.gemspec" }}
25
17
  paths:
26
18
  - vendor/bundle
27
-
28
19
  - run:
29
20
  name: Run the tests
30
21
  command: bundle exec rake
31
-
32
22
  - run:
33
23
  name: Parse SassDoc comments
34
- command: sassdoc core/ --parse --verbose --strict
24
+ command: npm run sassdoc
data/.hound.yml CHANGED
@@ -5,3 +5,4 @@ scss:
5
5
  stylelint:
6
6
  config_file: .stylelintrc.json
7
7
  enabled: true
8
+ # version: 10.1.0
data/.tool-versions CHANGED
@@ -1,2 +1,2 @@
1
- ruby 2.6.3
2
- nodejs 10.16.0
1
+ ruby 2.6.5
2
+ nodejs 12.16.1
data/CHANGELOG.md CHANGED
@@ -3,11 +3,41 @@
3
3
  All notable changes to this project will be documented in this file. This
4
4
  project adheres to [Semantic Versioning](http://semver.org).
5
5
 
6
- ## [Unreleased (`master`)][unreleased]
6
+ ## [7.2.0] - 2022-02-22
7
7
 
8
- Nothing at the moment.
8
+ ### Changed
9
+
10
+ - Revert "Replace `/` with `math.div` per Dart Sass 2.0.0 updates."
11
+
12
+ [7.2.0]: https://github.com/thoughtbot/bourbon/compare/v7.1.0...v7.2.0
13
+
14
+ ## [7.1.0] - 2022-02-22
15
+
16
+ ### Changed
17
+
18
+ - Replace `/` with `math.div` per Dart Sass 2.0.0 updates.
19
+
20
+ [7.1.0]: https://github.com/thoughtbot/bourbon/compare/v7.0.0...v7.1.0
21
+
22
+ ## [7.0.0] - 2020-03-09
23
+
24
+ ### Added
25
+
26
+ - Improved error handling of unsupported font file formats in the `font-face`
27
+ mixin (supported formats are `woff2` and `woff`).
28
+ - CSS `var()` and `env()` functions are now accepted as values in the
29
+ `position` and `size` mixins.
30
+
31
+ ### Changed
32
+
33
+ - Updated `thor` from 0.x to 1.x
34
+
35
+ ### Removed
36
+
37
+ - The `font-face` mixin no longer supports `ttf`, `svg`, and `eot`
38
+ font file formats.
9
39
 
10
- [unreleased]: https://github.com/thoughtbot/bourbon/compare/v6.0.0...HEAD
40
+ [7.0.0]: https://github.com/thoughtbot/bourbon/compare/v6.0.0...v7.0.0
11
41
 
12
42
  ## [6.0.0] - 2019-07-10
13
43
 
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright © 2011-2019 [thoughtbot, inc.](http://thoughtbot.com)
3
+ Copyright © 2011-2020 [thoughtbot, inc.](http://thoughtbot.com)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the “Software”), to deal
data/README.md CHANGED
@@ -29,7 +29,6 @@ It is…
29
29
  - [Installation](#installation)
30
30
  - [Command Line Interface](#command-line-interface)
31
31
  - [Browser Support](#browser-support)
32
- - [The Bourbon Family](#the-bourbon-family)
33
32
  - [Contributing](#contributing)
34
33
  - [License](#license)
35
34
  - [About](#about)
@@ -177,16 +176,6 @@ bourbon [options]
177
176
  Bourbon supports Internet Explorer 11+ and the latest versions of Chrome,
178
177
  Firefox, Safari, and Edge.
179
178
 
180
- ## The Bourbon Family
181
-
182
- Bourbon is part of a larger, modular family of Sass utilities:
183
-
184
- - [Neat]: A lightweight and flexible Sass grid
185
- - [Bitters]: Scaffold styles, variables and structure for Bourbon projects
186
-
187
- [Neat]: https://github.com/thoughtbot/neat
188
- [Bitters]: https://github.com/thoughtbot/bitters
189
-
190
179
  ## Contributing
191
180
 
192
181
  See the [contributing] document. Thank you, [contributors]!
@@ -196,14 +185,14 @@ See the [contributing] document. Thank you, [contributors]!
196
185
 
197
186
  ## License
198
187
 
199
- Bourbon is copyright © 2011-2019 [thoughtbot, inc.][thoughtbot] It is free
188
+ Bourbon is copyright © 2011-2020 [thoughtbot, inc.][thoughtbot] It is free
200
189
  software, and may be redistributed under the terms specified in the [license].
201
190
 
202
191
  [license]: LICENSE.md
203
192
 
204
193
  ## About
205
194
 
206
- Bourbon is maintained by Tyson Gach and the thoughtbot design team. It is funded
195
+ Bourbon is maintained by the thoughtbot design team. It is funded
207
196
  by [thoughtbot, inc.][thoughtbot] and the names and logos for thoughtbot are
208
197
  trademarks of thoughtbot, inc.
209
198
 
data/RELEASING.md CHANGED
@@ -6,7 +6,8 @@
6
6
  - `core/_bourbon.scss`
7
7
  - `package.json`
8
8
 
9
- 1. Update `CHANGELOG.md`. We follow the guidelines from [Keep a CHANGELOG].
9
+ 1. Update `CHANGELOG.md`. We follow the guidelines from
10
+ [Keep a Changelog][keep-a-changelog].
10
11
 
11
12
  1. Commit changes. Use the convention “Bourbon vX.X.X” in your commit message.
12
13
  There shouldn’t be code changes, and thus CI doesn’t need to run.
@@ -17,17 +18,15 @@
17
18
  1. Run `npm publish`, which pushes the new version to npm’s registry (if
18
19
  releasing a pre-release, run `npm publish --tag beta`).
19
20
 
20
- 1. Draft a [new GitHub release][github-release]. Upon publishing, a tweet will
21
- _automatically be sent_ on the [@bourbonsass] Twitter account via [Zapier].
22
- It will look like this:
21
+ 1. Draft a [new GitHub release][github-release].
22
+
23
+ 1. Tweet about the release from the [@bourbonsass] Twitter account, e.g.
23
24
 
24
25
  > We’ve released Bourbon {release_title}: {release_link}
25
26
 
26
- 1. Re-generate and publish the [documentation website], using the available
27
- Rake tasks.
27
+ 1. Re-generate and publish the [documentation website][website].
28
28
 
29
- [Keep a CHANGELOG]: http://keepachangelog.com
29
+ [keep-a-changelog]: https://keepachangelog.com/en/1.0.0/
30
30
  [github-release]: https://github.com/thoughtbot/bourbon/releases/new
31
- [documentation website]: https://github.com/thoughtbot/bourbon.io
32
31
  [@bourbonsass]: https://twitter.com/bourbonsass
33
- [Zapier]: https://zapier.com
32
+ [website]: https://github.com/thoughtbot/bourbon.io
data/bourbon.gemspec CHANGED
@@ -5,9 +5,10 @@ Gem::Specification.new do |s|
5
5
  s.add_development_dependency "aruba", "~> 0.14"
6
6
  s.add_development_dependency "css_parser", "~> 1.4"
7
7
  s.add_development_dependency "cucumber", "~> 2.0"
8
- s.add_development_dependency "rake", "~> 11.1"
8
+ s.add_development_dependency "rake"
9
9
  s.add_development_dependency "rspec", "~> 3.4"
10
- s.add_runtime_dependency "thor", "~> 0.19"
10
+ s.add_development_dependency "sass"
11
+ s.add_runtime_dependency "thor", "~> 1.0"
11
12
  s.authors = [
12
13
  "Christian Reuter",
13
14
  "Damian Galarza",
data/core/_bourbon.scss CHANGED
@@ -1,6 +1,6 @@
1
- // Bourbon 6.0.0
1
+ // Bourbon 7.2.0
2
2
  // https://www.bourbon.io/
3
- // Copyright 2011-2019 thoughtbot, inc.
3
+ // Copyright 2011-2020 thoughtbot, inc.
4
4
  // MIT License
5
5
 
6
6
  @import "bourbon/helpers/buttons-list";
@@ -64,13 +64,13 @@
64
64
  ) {
65
65
  @if not _is-color($base-color) {
66
66
  @error "`#{$base-color}` is not a valid color for the `$base-color` " +
67
- "argument in the `contrast-switch` function.";
67
+ "argument in the `contrast-switch` function.";
68
68
  } @else if not _is-color($dark-color) {
69
69
  @error "`#{$dark-color}` is not a valid color for the `$dark-color` " +
70
- "argument in the `contrast-switch` function.";
70
+ "argument in the `contrast-switch` function.";
71
71
  } @else if not _is-color($light-color) {
72
72
  @error "`#{$light-color}` is not a valid color for the `$light-color` " +
73
- "argument in the `contrast-switch` function.";
73
+ "argument in the `contrast-switch` function.";
74
74
  } @else {
75
75
  $-contrast-to-dark: _contrast-ratio($base-color, $dark-color);
76
76
  $-contrast-to-light: _contrast-ratio($base-color, $light-color);
@@ -1,7 +1,7 @@
1
1
  @charset "UTF-8";
2
2
 
3
3
  /// Generates an `@font-face` declaration. You can choose the specific file
4
- /// formats you need to output; the mixin supports `eot`, `ttf`, `svg`, `woff2`
4
+ /// formats you need to output; the mixin supports `woff2`
5
5
  /// and `woff`. The mixin also supports usage with the Rails Asset Pipeline,
6
6
  /// which you can enable per use, or globally in the `$bourbon()` settings.
7
7
  ///
@@ -9,11 +9,11 @@
9
9
  ///
10
10
  /// @argument {string} $file-path
11
11
  ///
12
- /// @argument {string | list} $file-formats [("ttf", "woff2", "woff")]
12
+ /// @argument {string | list} $file-formats [("woff2", "woff")]
13
13
  /// List of the font file formats to include. Can also be set globally using
14
14
  /// the `global-font-file-formats` key in the Bourbon settings.
15
15
  ///
16
- /// @argument {string} $asset-pipeline [false]
16
+ /// @argument {boolean} $asset-pipeline [false]
17
17
  /// Set to `true` if you’re using the Rails Asset Pipeline (place the fonts
18
18
  /// in `app/assets/fonts/`). Can also be set globally using the
19
19
  /// `rails-asset-pipeline` key in the Bourbon settings.
@@ -47,7 +47,7 @@
47
47
  @mixin hide-visually($toggle: "hide") {
48
48
  @if not index("hide" "unhide", $toggle) {
49
49
  @error "`#{$toggle}` is not a valid value for the `$toggle` argument in " +
50
- "the `hide-visually` mixin. Must be either `hide` or `unhide`.";
50
+ "the `hide-visually` mixin. Must be either `hide` or `unhide`.";
51
51
  } @else if $toggle == "hide" {
52
52
  border: 0;
53
53
  clip: rect(1px, 1px, 1px, 1px);
@@ -18,11 +18,8 @@
18
18
  /// overflow-wrap: break-word;
19
19
  /// }
20
20
 
21
- /* stylelint-disable order/properties-alphabetical-order */
22
-
23
21
  @mixin overflow-wrap($wrap: break-word) {
24
22
  word-wrap: $wrap;
23
+ // stylelint-disable-next-line order/properties-alphabetical-order
25
24
  overflow-wrap: $wrap;
26
25
  }
27
-
28
- /* stylelint-enable */
@@ -46,10 +46,10 @@
46
46
  ) {
47
47
  $box-edge-values: _unpack-shorthand($box-edge-values);
48
48
  $offsets: (
49
- top: nth($box-edge-values, 1),
50
- right: nth($box-edge-values, 2),
51
- bottom: nth($box-edge-values, 3),
52
- left: nth($box-edge-values, 4),
49
+ "top": nth($box-edge-values, 1),
50
+ "right": nth($box-edge-values, 2),
51
+ "bottom": nth($box-edge-values, 3),
52
+ "left": nth($box-edge-values, 4),
53
53
  );
54
54
 
55
55
  position: $position;
@@ -25,7 +25,7 @@
25
25
  ) {
26
26
  @if not _is-color($color) {
27
27
  @error "`#{$color}` is not a valid color for the `$color` argument in " +
28
- "the `shade` mixin.";
28
+ "the `shade` mixin.";
29
29
  } @else {
30
30
  @return mix(#000, $color, $percent);
31
31
  }
@@ -38,13 +38,13 @@
38
38
  height: $height;
39
39
  } @else {
40
40
  @error "`#{$height}` is not a valid length for the `$height` argument " +
41
- "in the `size` mixin.";
41
+ "in the `size` mixin.";
42
42
  }
43
43
 
44
44
  @if _is-size($width) {
45
45
  width: $width;
46
46
  } @else {
47
47
  @error "`#{$width}` is not a valid length for the `$width` argument " +
48
- "in the `size` mixin.";
48
+ "in the `size` mixin.";
49
49
  }
50
50
  }
@@ -25,7 +25,7 @@
25
25
  ) {
26
26
  @if not _is-color($color) {
27
27
  @error "`#{$color}` is not a valid color for the `$color` argument in " +
28
- "the `tint` mixin.";
28
+ "the `tint` mixin.";
29
29
  } @else {
30
30
  @return mix(#fff, $color, $percent);
31
31
  }
@@ -44,10 +44,10 @@
44
44
  $direction
45
45
  ) {
46
46
  @error "Direction must be `up`, `up-right`, `right`, `down-right`, " +
47
- "`down`, `down-left`, `left` or `up-left`.";
47
+ "`down`, `down-left`, `left` or `up-left`.";
48
48
  } @else if not _is-color($color) {
49
49
  @error "`#{$color}` is not a valid color for the `$color` argument in " +
50
- "the `triangle` mixin.";
50
+ "the `triangle` mixin.";
51
51
  } @else {
52
52
  border-style: solid;
53
53
  height: 0;
@@ -11,7 +11,7 @@
11
11
  /// @property {color} contrast-switch-light-color [#fff]
12
12
  /// Global light color for the `contrast-switch` function.
13
13
  ///
14
- /// @property {list} global-font-file-formats [("ttf", "woff2", "woff")]
14
+ /// @property {list} global-font-file-formats [("woff2", "woff")]
15
15
  /// Global font file formats for the `font-face` mixin.
16
16
  ///
17
17
  /// @property {number (with unit)} modular-scale-base [1em]
@@ -30,7 +30,7 @@
30
30
  $_bourbon-defaults: (
31
31
  "contrast-switch-dark-color": #000,
32
32
  "contrast-switch-light-color": #fff,
33
- "global-font-file-formats": ("ttf", "woff2", "woff"),
33
+ "global-font-file-formats": ("woff2", "woff"),
34
34
  "modular-scale-base": 1em,
35
35
  "modular-scale-ratio": $major-third,
36
36
  "rails-asset-pipeline": false,
@@ -48,7 +48,7 @@ $_bourbon-defaults: (
48
48
  /// @property {color} contrast-switch-light-color [#fff]
49
49
  /// Global light color for the `contrast-switch` function.
50
50
  ///
51
- /// @property {list} global-font-file-formats [("ttf", "woff2", "woff")]
51
+ /// @property {list} global-font-file-formats [("woff2", "woff")]
52
52
  /// Global font file formats for the `font-face` mixin.
53
53
  ///
54
54
  /// @property {number (with unit)} modular-scale-base [1em]
@@ -66,7 +66,7 @@ $_bourbon-defaults: (
66
66
  /// $bourbon: (
67
67
  /// "contrast-switch-dark-color": #000,
68
68
  /// "contrast-switch-light-color": #fff,
69
- /// "global-font-file-formats": ("ttf", "woff2", "woff"),
69
+ /// "global-font-file-formats": ("woff2", "woff"),
70
70
  /// "modular-scale-base": 1em,
71
71
  /// "modular-scale-ratio": $major-third,
72
72
  /// "rails-asset-pipeline": false,
@@ -27,23 +27,24 @@
27
27
  $src: ();
28
28
 
29
29
  $formats-map: (
30
- eot: "#{$file-path}.eot?#iefix" format("embedded-opentype"),
31
- woff2: "#{$file-path}.woff2" format("woff2"),
32
- woff: "#{$file-path}.woff" format("woff"),
33
- ttf: "#{$file-path}.ttf" format("truetype"),
34
- svg: "#{$file-path}.svg##{$font-family}" format("svg"),
30
+ "woff2": "#{$file-path}.woff2" format("woff2"),
31
+ "woff": "#{$file-path}.woff" format("woff"),
35
32
  );
36
33
 
37
- @each $key, $values in $formats-map {
38
- @if _contains($file-formats, $key) {
39
- $file-path: nth($values, 1);
40
- $font-format: nth($values, 2);
34
+ @each $format in $file-formats {
35
+ @if _contains(map-keys($formats-map), $format) {
36
+ $value: map-get($formats-map, $format);
37
+ $file-path: nth($value, 1);
38
+ $font-format: nth($value, 2);
41
39
 
42
40
  @if $asset-pipeline == true {
43
41
  $src: append($src, font-url($file-path) $font-format, comma);
44
42
  } @else {
45
43
  $src: append($src, url($file-path) $font-format, comma);
46
44
  }
45
+ } @else {
46
+ @error "`#{$file-formats}` contains an unsupported font file format. " +
47
+ "Must be `woff` and/or `woff2`.";
47
48
  }
48
49
  }
49
50
 
@@ -9,7 +9,12 @@
9
9
  /// @access private
10
10
 
11
11
  @function _is-length($value) {
12
- @return type-of($value) != "null" and (str-slice($value + "", 1, 4) == "calc"
13
- or index(auto inherit initial 0, $value)
14
- or (type-of($value) == "number" and not(unitless($value))));
12
+ @return type-of($value) != "null"
13
+ and (
14
+ str-slice($value + "", 1, 4) == "calc"
15
+ or str-slice($value + "", 1, 3) == "var"
16
+ or str-slice($value + "", 1, 3) == "env"
17
+ or index(auto inherit initial 0, $value)
18
+ or (type-of($value) == "number" and not(unitless($value)))
19
+ );
15
20
  }
@@ -14,5 +14,5 @@
14
14
 
15
15
  @function _is-size($value) {
16
16
  @return _is-length($value)
17
- or _contains("fill" "fit-content" "min-content" "max-content", $value);
17
+ or _contains("fill" "fit-content" "min-content" "max-content", $value);
18
18
  }
@@ -1,3 +1,3 @@
1
1
  module Bourbon
2
- VERSION = "6.0.0"
2
+ VERSION = "7.2.0"
3
3
  end