bourbon 5.0.0.beta.7 → 5.0.0.beta.8
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.
- checksums.yaml +4 -4
- data/.npmignore +3 -1
- data/.ruby-version +1 -1
- data/.scss-lint.yml +4 -0
- data/CHANGELOG.md +145 -5
- data/CONTRIBUTING.md +24 -2
- data/LICENSE.md +1 -1
- data/README.md +64 -66
- data/RELEASING.md +7 -6
- data/bourbon.gemspec +6 -6
- data/bower.json +8 -7
- data/circle.yml +4 -1
- data/core/_bourbon.scss +3 -3
- data/core/bourbon/library/_contrast-switch.scss +5 -6
- data/core/bourbon/library/_ellipsis.scss +3 -4
- data/core/bourbon/library/_font-face.scss +10 -11
- data/core/bourbon/library/_hide-visually.scss +8 -5
- data/core/bourbon/library/_modular-scale.scss +5 -6
- data/core/bourbon/library/_position.scss +3 -5
- data/core/bourbon/library/_prefixer.scss +4 -5
- data/core/bourbon/library/_shade.scss +3 -4
- data/core/bourbon/library/_size.scss +3 -4
- data/core/bourbon/library/_tint.scss +3 -4
- data/core/bourbon/library/_triangle.scss +16 -16
- data/core/bourbon/library/_value-prefixer.scss +4 -5
- data/core/bourbon/utilities/_assign-inputs.scss +3 -4
- data/core/bourbon/utilities/_directional-property.scss +4 -5
- data/core/bourbon/utilities/{_retrieve-bourbon-setting.scss → _fetch-bourbon-setting.scss} +2 -2
- data/core/bourbon/utilities/_font-source-declaration.scss +5 -6
- data/core/bourbon/validators/_contains.scss +3 -4
- data/lib/bourbon.rb +2 -5
- data/lib/bourbon/generator.rb +1 -1
- data/lib/bourbon/version.rb +1 -1
- data/package.json +2 -1
- data/spec/bourbon/library/hide_visually_spec.rb +1 -1
- data/spec/bourbon/library/triangle_spec.rb +6 -6
- data/spec/bourbon/utilities/{retrieve_bourbon_setting_spec.rb → fetch_bourbon_setting_spec.rb} +4 -4
- data/spec/fixtures/library/font-face-2.scss +3 -3
- data/spec/fixtures/library/hide-visually.scss +1 -1
- data/spec/fixtures/library/triangle.scss +4 -4
- data/spec/fixtures/utilities/{retrieve-bourbon-setting.scss → fetch-bourbon-setting.scss} +2 -2
- metadata +20 -20
data/RELEASING.md
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# Releasing
|
2
2
|
|
3
3
|
1. Update the version number in these places:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
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
|
-
|
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.
|
data/bourbon.gemspec
CHANGED
@@ -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
|
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
|
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
|
-
"
|
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.
|
38
|
+
"version": "5.0.0-beta.8"
|
38
39
|
}
|
data/circle.yml
CHANGED
data/core/_bourbon.scss
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
// Bourbon 5.0.0-beta.
|
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}
|
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
|
-
|
62
|
-
|
63
|
-
|
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.";
|
@@ -25,10 +25,10 @@
|
|
25
25
|
///
|
26
26
|
/// @example scss
|
27
27
|
/// @include font-face(
|
28
|
-
///
|
29
|
-
///
|
30
|
-
///
|
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}
|
47
|
+
/// @require {function} _fetch-bourbon-setting
|
48
48
|
|
49
49
|
@mixin font-face(
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
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:
|
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
|
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:
|
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}
|
68
|
+
/// @require {function} _fetch-bourbon-setting
|
69
69
|
|
70
70
|
@function modular-scale(
|
71
|
-
|
72
|
-
|
73
|
-
|
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
|
-
|
45
|
-
|
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),
|
@@ -2,23 +2,23 @@
|
|
2
2
|
|
3
3
|
/// Generates a triangle pointing in a specified direction.
|
4
4
|
///
|
5
|
-
/// @argument {string} $direction
|
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 {
|
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
|
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
|
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
|
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
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
37
|
+
$direction,
|
38
|
+
$width,
|
39
|
+
$height,
|
40
|
+
$color
|
41
|
+
) {
|
42
42
|
@if not index(
|
43
|
-
|
44
|
-
|
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
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
$property,
|
30
|
+
$value,
|
31
|
+
$prefixes: ()
|
32
|
+
) {
|
34
33
|
@each $prefix in $prefixes {
|
35
34
|
#{$property}: #{"-" + $prefix + "-" + $value};
|
36
35
|
}
|
@@ -33,11 +33,10 @@
|
|
33
33
|
/// @access private
|
34
34
|
|
35
35
|
@mixin _directional-property(
|
36
|
-
|
37
|
-
|
38
|
-
|
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
|
-
///
|
10
|
+
/// _fetch-bourbon-setting(rails-asset-pipeline)
|
11
11
|
///
|
12
12
|
/// @access private
|
13
13
|
|
14
|
-
@function
|
14
|
+
@function _fetch-bourbon-setting($setting) {
|
15
15
|
@return map-get(map-merge($_bourbon-defaults, $bourbon), $setting);
|
16
16
|
}
|