bourbon 5.0.0.beta.7 → 5.0.0.beta.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.npmignore +3 -1
  3. data/.ruby-version +1 -1
  4. data/.scss-lint.yml +4 -0
  5. data/CHANGELOG.md +145 -5
  6. data/CONTRIBUTING.md +24 -2
  7. data/LICENSE.md +1 -1
  8. data/README.md +64 -66
  9. data/RELEASING.md +7 -6
  10. data/bourbon.gemspec +6 -6
  11. data/bower.json +8 -7
  12. data/circle.yml +4 -1
  13. data/core/_bourbon.scss +3 -3
  14. data/core/bourbon/library/_contrast-switch.scss +5 -6
  15. data/core/bourbon/library/_ellipsis.scss +3 -4
  16. data/core/bourbon/library/_font-face.scss +10 -11
  17. data/core/bourbon/library/_hide-visually.scss +8 -5
  18. data/core/bourbon/library/_modular-scale.scss +5 -6
  19. data/core/bourbon/library/_position.scss +3 -5
  20. data/core/bourbon/library/_prefixer.scss +4 -5
  21. data/core/bourbon/library/_shade.scss +3 -4
  22. data/core/bourbon/library/_size.scss +3 -4
  23. data/core/bourbon/library/_tint.scss +3 -4
  24. data/core/bourbon/library/_triangle.scss +16 -16
  25. data/core/bourbon/library/_value-prefixer.scss +4 -5
  26. data/core/bourbon/utilities/_assign-inputs.scss +3 -4
  27. data/core/bourbon/utilities/_directional-property.scss +4 -5
  28. data/core/bourbon/utilities/{_retrieve-bourbon-setting.scss → _fetch-bourbon-setting.scss} +2 -2
  29. data/core/bourbon/utilities/_font-source-declaration.scss +5 -6
  30. data/core/bourbon/validators/_contains.scss +3 -4
  31. data/lib/bourbon.rb +2 -5
  32. data/lib/bourbon/generator.rb +1 -1
  33. data/lib/bourbon/version.rb +1 -1
  34. data/package.json +2 -1
  35. data/spec/bourbon/library/hide_visually_spec.rb +1 -1
  36. data/spec/bourbon/library/triangle_spec.rb +6 -6
  37. data/spec/bourbon/utilities/{retrieve_bourbon_setting_spec.rb → fetch_bourbon_setting_spec.rb} +4 -4
  38. data/spec/fixtures/library/font-face-2.scss +3 -3
  39. data/spec/fixtures/library/hide-visually.scss +1 -1
  40. data/spec/fixtures/library/triangle.scss +4 -4
  41. data/spec/fixtures/utilities/{retrieve-bourbon-setting.scss → fetch-bourbon-setting.scss} +2 -2
  42. metadata +20 -20
@@ -1,11 +1,12 @@
1
1
  # Releasing
2
2
 
3
3
  1. Update the version number in these places:
4
- - `lib/bourbon/version.rb`
5
- - `core/_bourbon.scss`
6
- - `package.json`
7
- - `bower.json`
8
- - `README.md`
4
+
5
+ - `lib/bourbon/version.rb`
6
+ - `core/_bourbon.scss`
7
+ - `package.json`
8
+ - `bower.json`
9
+ - `README.md`
9
10
 
10
11
  1. Update `CHANGELOG.md`. We follow the guidelines from [Keep a CHANGELOG].
11
12
 
@@ -22,7 +23,7 @@
22
23
  _automatically be sent_ on the [@bourbonsass] Twitter account via [Zapier].
23
24
  It will look like this:
24
25
 
25
- > We’ve released {release_title}: {release_link}
26
+ > We’ve released Bourbon {release_title}: {release_link}
26
27
 
27
28
  1. Re-generate and publish the [documentation website], using the available
28
29
  Rake tasks.
@@ -3,12 +3,12 @@ require "bourbon/version"
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.add_development_dependency "aruba", "~> 0.6.2"
6
- s.add_development_dependency "css_parser", "~> 1.4.1"
7
- s.add_development_dependency "rake", "~> 11.1.2"
8
- s.add_development_dependency "rspec", "~> 3.4.0"
9
- s.add_development_dependency "scss_lint", "0.48.0"
10
- s.add_runtime_dependency "sass", "~> 3.4.22"
11
- s.add_runtime_dependency "thor", "~> 0.19.1"
6
+ s.add_development_dependency "css_parser", "~> 1.4"
7
+ s.add_development_dependency "rake", "~> 11.1"
8
+ s.add_development_dependency "rspec", "~> 3.4"
9
+ s.add_development_dependency "scss_lint", "0.48"
10
+ s.add_runtime_dependency "sass", "~> 3.4"
11
+ s.add_runtime_dependency "thor", "~> 0.19"
12
12
  s.authors = [
13
13
  "Christian Reuter",
14
14
  "Damian Galarza",
data/bower.json CHANGED
@@ -6,20 +6,21 @@
6
6
  "homepage": "http://bourbon.io",
7
7
  "ignore": [
8
8
  "**/.*",
9
- "_site",
10
- "bin",
9
+ "_site/",
10
+ "bin/",
11
11
  "bourbon.gemspec",
12
+ "circle.yml",
12
13
  "eyeglass-exports.js",
13
- "features",
14
+ "features/",
14
15
  "Gemfile",
15
16
  "Gemfile.lock",
16
17
  "index.js",
17
- "lib",
18
+ "lib/",
18
19
  "package.json",
20
+ "pkg/",
19
21
  "Rakefile",
20
22
  "RELEASING.md",
21
- "sache.json",
22
- "spec"
23
+ "spec/"
23
24
  ],
24
25
  "keywords": [
25
26
  "css",
@@ -34,5 +35,5 @@
34
35
  "type": "git",
35
36
  "url": "https://github.com/thoughtbot/bourbon.git"
36
37
  },
37
- "version": "5.0.0-beta.7"
38
+ "version": "5.0.0-beta.8"
38
39
  }
data/circle.yml CHANGED
@@ -1,11 +1,14 @@
1
1
  dependencies:
2
2
  override:
3
3
  - bundle install
4
- - npm install -g sassdoc
4
+ - npm install -g sassdoc@2.2.0
5
5
  general:
6
6
  branches:
7
7
  ignore:
8
8
  - gh-pages
9
+ machine:
10
+ node:
11
+ version: 6.9.5
9
12
  test:
10
13
  override:
11
14
  - bundle exec rake
@@ -1,6 +1,6 @@
1
- // Bourbon 5.0.0-beta.7
1
+ // Bourbon 5.0.0-beta.8
2
2
  // http://bourbon.io
3
- // Copyright 2011 thoughtbot, inc.
3
+ // Copyright 2011-2017 thoughtbot, inc.
4
4
  // MIT License
5
5
 
6
6
  @import "bourbon/helpers/buttons-list";
@@ -19,11 +19,11 @@
19
19
  @import "bourbon/utilities/assign-inputs";
20
20
  @import "bourbon/utilities/compact-shorthand";
21
21
  @import "bourbon/utilities/directional-property";
22
+ @import "bourbon/utilities/fetch-bourbon-setting";
22
23
  @import "bourbon/utilities/font-source-declaration";
23
24
  @import "bourbon/utilities/gamma";
24
25
  @import "bourbon/utilities/lightness";
25
26
  @import "bourbon/utilities/contrast-ratio";
26
- @import "bourbon/utilities/retrieve-bourbon-setting";
27
27
  @import "bourbon/utilities/unpack-shorthand";
28
28
 
29
29
  @import "bourbon/library/border-color";
@@ -49,7 +49,7 @@
49
49
  /// color: #eee;
50
50
  /// }
51
51
  ///
52
- /// @require {function} _retrieve-bourbon-setting
52
+ /// @require {function} _fetch-bourbon-setting
53
53
  ///
54
54
  /// @require {function} _is-color
55
55
  ///
@@ -58,11 +58,10 @@
58
58
  /// @since 5.0.0
59
59
 
60
60
  @function contrast-switch(
61
- $base-color,
62
- $dark-color: _retrieve-bourbon-setting("contrast-switch-dark-color"),
63
- $light-color: _retrieve-bourbon-setting("contrast-switch-light-color")
64
- ) {
65
-
61
+ $base-color,
62
+ $dark-color: _fetch-bourbon-setting("contrast-switch-dark-color"),
63
+ $light-color: _fetch-bourbon-setting("contrast-switch-light-color")
64
+ ) {
66
65
  @if not _is-color($base-color) {
67
66
  @error "`#{$base-color}` is not a valid color for the `$base-color` " +
68
67
  "argument in the `contrast-switch` function.";
@@ -24,10 +24,9 @@
24
24
  /// }
25
25
 
26
26
  @mixin ellipsis(
27
- $width: 100%,
28
- $display: inline-block
29
- ) {
30
-
27
+ $width: 100%,
28
+ $display: inline-block
29
+ ) {
31
30
  display: $display;
32
31
  max-width: $width;
33
32
  overflow: hidden;
@@ -25,10 +25,10 @@
25
25
  ///
26
26
  /// @example scss
27
27
  /// @include font-face(
28
- /// "source-sans-pro",
29
- /// "fonts/source-sans-pro-regular",
30
- /// ("woff2", "woff")
31
- /// ) {
28
+ /// "source-sans-pro",
29
+ /// "fonts/source-sans-pro-regular",
30
+ /// ("woff2", "woff")
31
+ /// ) {
32
32
  /// font-style: normal;
33
33
  /// font-weight: 400;
34
34
  /// }
@@ -44,15 +44,14 @@
44
44
  ///
45
45
  /// @require {function} _font-source-declaration
46
46
  ///
47
- /// @require {function} _retrieve-bourbon-setting
47
+ /// @require {function} _fetch-bourbon-setting
48
48
 
49
49
  @mixin font-face(
50
- $font-family,
51
- $file-path,
52
- $file-formats: _retrieve-bourbon-setting("global-font-file-formats"),
53
- $asset-pipeline: _retrieve-bourbon-setting("rails-asset-pipeline")
54
- ) {
55
-
50
+ $font-family,
51
+ $file-path,
52
+ $file-formats: _fetch-bourbon-setting("global-font-file-formats"),
53
+ $asset-pipeline: _fetch-bourbon-setting("rails-asset-pipeline")
54
+ ) {
56
55
  @font-face {
57
56
  font-family: $font-family;
58
57
  src: _font-source-declaration(
@@ -16,7 +16,7 @@
16
16
  ///
17
17
  /// &:active,
18
18
  /// &:focus {
19
- /// @include hide-visually(unhide);
19
+ /// @include hide-visually("unhide");
20
20
  /// }
21
21
  /// }
22
22
  ///
@@ -24,7 +24,7 @@
24
24
  /// .element {
25
25
  /// border: 0;
26
26
  /// clip: rect(1px, 1px, 1px, 1px);
27
- /// clip-path: circle(1% at 1% 1%);
27
+ /// clip-path: inset(100%);
28
28
  /// height: 1px;
29
29
  /// overflow: hidden;
30
30
  /// padding: 0;
@@ -44,11 +44,14 @@
44
44
  ///
45
45
  /// @since 5.0.0
46
46
 
47
- @mixin hide-visually($toggle: hide) {
48
- @if $toggle == "hide" {
47
+ @mixin hide-visually($toggle: "hide") {
48
+ @if not index("hide" "unhide", $toggle) {
49
+ @error "`#{$toggle}` is not a valid value for the `$toggle` argument in " +
50
+ "the `hide-visually` mixin. Must be either `hide` or `unhide`.";
51
+ } @else if $toggle == "hide" {
49
52
  border: 0;
50
53
  clip: rect(1px, 1px, 1px, 1px);
51
- clip-path: circle(1% at 1% 1%);
54
+ clip-path: inset(100%);
52
55
  height: 1px;
53
56
  overflow: hidden;
54
57
  padding: 0;
@@ -65,14 +65,13 @@
65
65
  /// font-size: 1.728em;
66
66
  /// }
67
67
  ///
68
- /// @require {function} _retrieve-bourbon-setting
68
+ /// @require {function} _fetch-bourbon-setting
69
69
 
70
70
  @function modular-scale(
71
- $increment,
72
- $value: _retrieve-bourbon-setting("modular-scale-base"),
73
- $ratio: _retrieve-bourbon-setting("modular-scale-ratio")
74
- ) {
75
-
71
+ $increment,
72
+ $value: _fetch-bourbon-setting("modular-scale-base"),
73
+ $ratio: _fetch-bourbon-setting("modular-scale-ratio")
74
+ ) {
76
75
  $v1: nth($value, 1);
77
76
  $v2: nth($value, length($value));
78
77
  $value: $v1;
@@ -41,12 +41,10 @@
41
41
  /// @require {function} _unpack-shorthand
42
42
 
43
43
  @mixin position(
44
- $position,
45
- $box-edge-values
46
- ) {
47
-
44
+ $position,
45
+ $box-edge-values
46
+ ) {
48
47
  $box-edge-values: _unpack-shorthand($box-edge-values);
49
-
50
48
  $offsets: (
51
49
  top: nth($box-edge-values, 1),
52
50
  right: nth($box-edge-values, 2),
@@ -26,11 +26,10 @@
26
26
  /// @author Hugo Giraudel
27
27
 
28
28
  @mixin prefixer(
29
- $property,
30
- $value,
31
- $prefixes: ()
32
- ) {
33
-
29
+ $property,
30
+ $value,
31
+ $prefixes: ()
32
+ ) {
34
33
  @each $prefix in $prefixes {
35
34
  #{"-" + $prefix + "-" + $property}: $value;
36
35
  }
@@ -20,10 +20,9 @@
20
20
  /// }
21
21
 
22
22
  @function shade(
23
- $color,
24
- $percent
25
- ) {
26
-
23
+ $color,
24
+ $percent
25
+ ) {
27
26
  @if not _is-color($color) {
28
27
  @error "`#{$color}` is not a valid color for the `$color` argument in " +
29
28
  "the `shade` mixin.";
@@ -31,10 +31,9 @@
31
31
  /// @require {function} _is-size
32
32
 
33
33
  @mixin size(
34
- $width,
35
- $height: $width
36
- ) {
37
-
34
+ $width,
35
+ $height: $width
36
+ ) {
38
37
  @if _is-size($height) {
39
38
  height: $height;
40
39
  } @else {
@@ -20,10 +20,9 @@
20
20
  /// }
21
21
 
22
22
  @function tint(
23
- $color,
24
- $percent
25
- ) {
26
-
23
+ $color,
24
+ $percent
25
+ ) {
27
26
  @if not _is-color($color) {
28
27
  @error "`#{$color}` is not a valid color for the `$color` argument in " +
29
28
  "the `tint` mixin.";
@@ -2,23 +2,23 @@
2
2
 
3
3
  /// Generates a triangle pointing in a specified direction.
4
4
  ///
5
- /// @argument {string} $direction [up]
5
+ /// @argument {string} $direction
6
6
  /// The direction the triangle should point. Accepts `up`, `up-right`,
7
7
  /// `right`, `down-right`, `down`, `down-left`, `left` or `up-left`.
8
8
  ///
9
- /// @argument {color} $color [currentColor]
10
- /// Color of the triangle.
11
- ///
12
- /// @argument {number (with unit)} $width [1rem]
9
+ /// @argument {number (with unit)} $width
13
10
  /// Width of the triangle.
14
11
  ///
15
- /// @argument {number (with unit)} $height [($width / 2)]
12
+ /// @argument {number (with unit)} $height
16
13
  /// Height of the triangle.
17
14
  ///
15
+ /// @argument {color} $color
16
+ /// Color of the triangle.
17
+ ///
18
18
  /// @example scss
19
19
  /// .element {
20
20
  /// &::before {
21
- /// @include triangle(up, #b25c9c, 2rem);
21
+ /// @include triangle("up", 2rem, 1rem, #b25c9c);
22
22
  /// content: "";
23
23
  /// }
24
24
  /// }
@@ -28,21 +28,21 @@
28
28
  /// border-style: solid;
29
29
  /// height: 0;
30
30
  /// width: 0;
31
- /// border-color: transparent transparent #b25c9c transparent;
31
+ /// border-color: transparent transparent #b25c9c;
32
32
  /// border-width: 0 1rem 1rem;
33
33
  /// content: "";
34
34
  /// }
35
35
 
36
36
  @mixin triangle(
37
- $direction: up,
38
- $color: currentColor,
39
- $width: 1rem,
40
- $height: ($width / 2)
41
- ) {
37
+ $direction,
38
+ $width,
39
+ $height,
40
+ $color
41
+ ) {
42
42
  @if not index(
43
- "up" "up-right" "right" "down-right" "down" "down-left" "left" "up-left",
44
- $direction
45
- ) {
43
+ "up" "up-right" "right" "down-right" "down" "down-left" "left" "up-left",
44
+ $direction
45
+ ) {
46
46
  @error "Direction must be `up`, `up-right`, `right`, `down-right`, " +
47
47
  "`down`, `down-left`, `left` or `up-left`.";
48
48
  } @else if not _is-color($color) {
@@ -26,11 +26,10 @@
26
26
  /// @author Matthew Tobiasz
27
27
 
28
28
  @mixin value-prefixer(
29
- $property,
30
- $value,
31
- $prefixes: ()
32
- ) {
33
-
29
+ $property,
30
+ $value,
31
+ $prefixes: ()
32
+ ) {
34
33
  @each $prefix in $prefixes {
35
34
  #{$property}: #{"-" + $prefix + "-" + $value};
36
35
  }
@@ -13,10 +13,9 @@
13
13
  /// @access private
14
14
 
15
15
  @function _assign-inputs(
16
- $inputs,
17
- $pseudo: null
18
- ) {
19
-
16
+ $inputs,
17
+ $pseudo: null
18
+ ) {
20
19
  $list: ();
21
20
 
22
21
  @each $input in $inputs {
@@ -33,11 +33,10 @@
33
33
  /// @access private
34
34
 
35
35
  @mixin _directional-property(
36
- $property,
37
- $suffix,
38
- $values
39
- ) {
40
-
36
+ $property,
37
+ $suffix,
38
+ $values
39
+ ) {
41
40
  $top: $property + "-top" + if($suffix, "-#{$suffix}", "");
42
41
  $bottom: $property + "-bottom" + if($suffix, "-#{$suffix}", "");
43
42
  $left: $property + "-left" + if($suffix, "-#{$suffix}", "");
@@ -7,10 +7,10 @@
7
7
  /// @return {boolean | color | list | number | string}
8
8
  ///
9
9
  /// @example scss
10
- /// _retrieve-bourbon-setting(rails-asset-pipeline)
10
+ /// _fetch-bourbon-setting(rails-asset-pipeline)
11
11
  ///
12
12
  /// @access private
13
13
 
14
- @function _retrieve-bourbon-setting($setting) {
14
+ @function _fetch-bourbon-setting($setting) {
15
15
  @return map-get(map-merge($_bourbon-defaults, $bourbon), $setting);
16
16
  }