bourbon 5.0.0.beta.6 → 5.0.0.beta.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE.md +11 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +5 -0
- data/CHANGELOG.md +32 -1
- data/README.md +111 -44
- data/RELEASING.md +3 -2
- data/bourbon.gemspec +3 -5
- data/bower.json +2 -2
- data/core/_bourbon.scss +8 -6
- data/core/bourbon/library/_border-color.scss +8 -7
- data/core/bourbon/library/_border-radius.scss +12 -12
- data/core/bourbon/library/_border-style.scss +8 -7
- data/core/bourbon/library/_border-width.scss +8 -7
- data/core/bourbon/library/_buttons.scss +4 -4
- data/core/bourbon/library/_clearfix.scss +2 -2
- data/core/bourbon/library/_contrast-switch.scss +36 -14
- data/core/bourbon/library/_ellipsis.scss +1 -1
- data/core/bourbon/library/_font-face.scss +5 -4
- data/core/bourbon/library/_font-stacks.scss +170 -8
- data/core/bourbon/library/_hide-text.scss +2 -2
- data/core/bourbon/library/_hide-visually.scss +4 -2
- data/core/bourbon/library/_margin.scss +17 -14
- data/core/bourbon/library/_modular-scale.scss +28 -20
- data/core/bourbon/library/_overflow-wrap.scss +24 -0
- data/core/bourbon/library/_padding.scss +12 -10
- data/core/bourbon/library/_position.scss +30 -20
- data/core/bourbon/library/_prefixer.scss +1 -1
- data/core/bourbon/library/_shade.scss +1 -1
- data/core/bourbon/library/_size.scss +7 -5
- data/core/bourbon/library/_strip-unit.scss +1 -1
- data/core/bourbon/library/_text-inputs.scss +5 -5
- data/core/bourbon/library/_timing-functions.scss +1 -1
- data/core/bourbon/library/_tint.scss +1 -1
- data/core/bourbon/library/_triangle.scss +1 -1
- data/core/bourbon/library/_value-prefixer.scss +1 -1
- data/core/bourbon/settings/_settings.scss +28 -4
- data/core/bourbon/utilities/{_collapse-directionals.scss → _compact-shorthand.scss} +6 -18
- data/core/bourbon/utilities/_contrast-ratio.scss +31 -0
- data/core/bourbon/utilities/_directional-property.scss +71 -0
- data/core/bourbon/utilities/_font-source-declaration.scss +1 -1
- data/core/bourbon/utilities/_gamma.scss +21 -0
- data/core/bourbon/utilities/_lightness.scss +24 -0
- data/core/bourbon/utilities/{_unpack.scss → _unpack-shorthand.scss} +4 -4
- data/core/bourbon/validators/_contains-falsy.scss +1 -1
- data/lib/bourbon/version.rb +1 -1
- data/package.json +2 -2
- data/spec/bourbon/library/font_stacks_spec.rb +6 -4
- data/spec/bourbon/library/hide_visually_spec.rb +2 -0
- data/spec/bourbon/library/overflow_wrap_spec.rb +27 -0
- data/spec/bourbon/utilities/compact_shorthand_spec.rb +30 -0
- data/spec/bourbon/utilities/{directional_values_spec.rb → directional_property_spec.rb} +9 -2
- data/spec/fixtures/library/overflow-wrap.scss +9 -0
- data/spec/fixtures/library/position.scss +0 -4
- data/spec/fixtures/utilities/compact-shorthand.scss +21 -0
- data/spec/fixtures/utilities/{directional-values.scss → directional-property.scss} +4 -0
- data/spec/fixtures/utilities/unpack.scss +4 -4
- metadata +26 -28
- data/core/bourbon/library/_word-wrap.scss +0 -29
- data/core/bourbon/utilities/_directional-values.scss +0 -58
- data/core/bourbon/validators/_is-light.scss +0 -23
- data/spec/bourbon/library/word_wrap_spec.rb +0 -29
- data/spec/bourbon/utilities/collapse_directionals.rb +0 -25
- data/spec/bourbon/validators/is_light_spec.rb +0 -37
- data/spec/fixtures/library/word-wrap.scss +0 -9
- data/spec/fixtures/utilities/collapse-directionals.scss +0 -17
- data/spec/fixtures/validators/is-light.scss +0 -29
@@ -3,14 +3,14 @@
|
|
3
3
|
/// Hides the text in an element, commonly used to show an image instead. Some
|
4
4
|
/// elements will need block-level styles applied.
|
5
5
|
///
|
6
|
-
/// @link
|
6
|
+
/// @link https://goo.gl/EvLRIu
|
7
7
|
///
|
8
8
|
/// @example scss
|
9
9
|
/// .element {
|
10
10
|
/// @include hide-text;
|
11
11
|
/// }
|
12
12
|
///
|
13
|
-
///
|
13
|
+
/// // CSS Output
|
14
14
|
/// .element {
|
15
15
|
/// overflow: hidden;
|
16
16
|
/// text-indent: 101%;
|
@@ -5,7 +5,7 @@
|
|
5
5
|
/// the affects of the hiding, which is handy for showing the element on focus,
|
6
6
|
/// for example.
|
7
7
|
///
|
8
|
-
/// @link
|
8
|
+
/// @link https://goo.gl/Vf1TGn
|
9
9
|
///
|
10
10
|
/// @argument {string} $toggle [hide]
|
11
11
|
/// Accepts `hide` or `unhide`. `unhide` reverses the affects of `hide`.
|
@@ -20,7 +20,7 @@
|
|
20
20
|
/// }
|
21
21
|
/// }
|
22
22
|
///
|
23
|
-
///
|
23
|
+
/// // CSS Output
|
24
24
|
/// .element {
|
25
25
|
/// border: 0;
|
26
26
|
/// clip: rect(1px, 1px, 1px, 1px);
|
@@ -53,6 +53,7 @@
|
|
53
53
|
overflow: hidden;
|
54
54
|
padding: 0;
|
55
55
|
position: absolute;
|
56
|
+
white-space: nowrap;
|
56
57
|
width: 1px;
|
57
58
|
} @else if $toggle == "unhide" {
|
58
59
|
clip: auto;
|
@@ -60,6 +61,7 @@
|
|
60
61
|
height: auto;
|
61
62
|
overflow: visible;
|
62
63
|
position: static;
|
64
|
+
white-space: inherit;
|
63
65
|
width: auto;
|
64
66
|
}
|
65
67
|
}
|
@@ -1,27 +1,30 @@
|
|
1
1
|
@charset "UTF-8";
|
2
2
|
|
3
|
-
/// Provides a
|
4
|
-
/// box. Use a `null` value to “skip”
|
3
|
+
/// Provides a concise, one-line method for setting `margin` on specific edges
|
4
|
+
/// of a box. Use a `null` value to “skip” edges of the box with standard
|
5
|
+
/// CSS shorthand.
|
5
6
|
///
|
6
|
-
/// @argument {
|
7
|
-
/// List of margin values
|
7
|
+
/// @argument {list} $values
|
8
|
+
/// List of margin values; accepts CSS shorthand.
|
8
9
|
///
|
9
10
|
/// @example scss
|
10
|
-
/// .element
|
11
|
+
/// .element {
|
11
12
|
/// @include margin(null auto);
|
12
13
|
/// }
|
13
14
|
///
|
14
|
-
///
|
15
|
-
///
|
16
|
-
/// }
|
17
|
-
///
|
18
|
-
/// @example css
|
19
|
-
/// .element-one {
|
15
|
+
/// // CSS Output
|
16
|
+
/// .element {
|
20
17
|
/// margin-left: auto;
|
21
18
|
/// margin-right: auto;
|
22
19
|
/// }
|
23
20
|
///
|
24
|
-
///
|
21
|
+
/// @example scss
|
22
|
+
/// .element {
|
23
|
+
/// @include margin(10px 3em 20vh null);
|
24
|
+
/// }
|
25
|
+
///
|
26
|
+
/// // CSS Output
|
27
|
+
/// .element {
|
25
28
|
/// margin-bottom: 20vh;
|
26
29
|
/// margin-right: 3em;
|
27
30
|
/// margin-top: 10px;
|
@@ -29,6 +32,6 @@
|
|
29
32
|
///
|
30
33
|
/// @require {mixin} _directional-property
|
31
34
|
|
32
|
-
@mixin margin($values
|
33
|
-
@include _directional-property(margin,
|
35
|
+
@mixin margin($values) {
|
36
|
+
@include _directional-property(margin, null, $values);
|
34
37
|
}
|
@@ -11,49 +11,57 @@
|
|
11
11
|
/// How many steps to increment up or down the scale.
|
12
12
|
///
|
13
13
|
/// @argument {number (with unit) | list} $value [1em]
|
14
|
-
/// The base value the scale starts at.
|
14
|
+
/// The base value the scale starts at. Can also be set globally using the
|
15
|
+
/// `modular-scale-base` key in the Bourbon settings.
|
15
16
|
///
|
16
17
|
/// @argument {number (unitless)} $ratio [1.25]
|
17
|
-
/// The ratio the scale is built on.
|
18
|
+
/// The ratio the scale is built on. Can also be set globally using the
|
19
|
+
/// `modular-scale-ratio` key in the Bourbon settings.
|
18
20
|
///
|
19
21
|
/// @return {number (with unit)}
|
20
22
|
///
|
21
23
|
/// @example scss
|
22
|
-
/// .
|
24
|
+
/// .element {
|
23
25
|
/// font-size: modular-scale(2);
|
24
26
|
/// }
|
25
27
|
///
|
26
|
-
///
|
28
|
+
/// // CSS Output
|
29
|
+
/// .element {
|
30
|
+
/// font-size: 1.5625em;
|
31
|
+
/// }
|
32
|
+
///
|
33
|
+
/// @example scss
|
34
|
+
/// .element {
|
27
35
|
/// margin-right: modular-scale(3, 2em);
|
28
36
|
/// }
|
29
37
|
///
|
30
|
-
///
|
38
|
+
/// // CSS Output
|
39
|
+
/// .element {
|
40
|
+
/// margin-right: 3.90625em;
|
41
|
+
/// }
|
42
|
+
///
|
43
|
+
/// @example scss
|
44
|
+
/// .element {
|
31
45
|
/// font-size: modular-scale(3, 1em 1.6em, $major-seventh);
|
32
46
|
/// }
|
33
47
|
///
|
48
|
+
/// // CSS Output
|
49
|
+
/// .element {
|
50
|
+
/// font-size: 3em;
|
51
|
+
/// }
|
52
|
+
///
|
53
|
+
/// @example scss
|
34
54
|
/// // Globally change the base ratio
|
35
55
|
/// $bourbon: (
|
36
56
|
/// "modular-scale-ratio": 1.2,
|
37
57
|
/// );
|
38
58
|
///
|
39
|
-
/// .
|
59
|
+
/// .element {
|
40
60
|
/// font-size: modular-scale(3);
|
41
61
|
/// }
|
42
62
|
///
|
43
|
-
///
|
44
|
-
/// .
|
45
|
-
/// font-size: 1.5625em;
|
46
|
-
/// }
|
47
|
-
///
|
48
|
-
/// .second-element {
|
49
|
-
/// margin-right: 3.90625em;
|
50
|
-
/// }
|
51
|
-
///
|
52
|
-
/// .third-element {
|
53
|
-
/// font-size: 3em;
|
54
|
-
/// }
|
55
|
-
///
|
56
|
-
/// .fourth-element {
|
63
|
+
/// // CSS Output
|
64
|
+
/// .element {
|
57
65
|
/// font-size: 1.728em;
|
58
66
|
/// }
|
59
67
|
///
|
@@ -0,0 +1,24 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// Outputs the `overflow-wrap` property and its legacy name `word-wrap` to
|
4
|
+
/// support browsers that do not yet use `overflow-wrap`.
|
5
|
+
///
|
6
|
+
/// @argument {string} $wrap [break-word]
|
7
|
+
/// Accepted CSS values are `normal`, `break-word`, `inherit`, `initial`,
|
8
|
+
/// or `unset`.
|
9
|
+
///
|
10
|
+
/// @example scss
|
11
|
+
/// .wrapper {
|
12
|
+
/// @include overflow-wrap;
|
13
|
+
/// }
|
14
|
+
///
|
15
|
+
/// // CSS Output
|
16
|
+
/// .wrapper {
|
17
|
+
/// word-wrap: break-word;
|
18
|
+
/// overflow-wrap: break-word;
|
19
|
+
/// }
|
20
|
+
|
21
|
+
@mixin overflow-wrap($wrap: break-word) {
|
22
|
+
word-wrap: $wrap;
|
23
|
+
overflow-wrap: $wrap;
|
24
|
+
}
|
@@ -1,26 +1,28 @@
|
|
1
1
|
@charset "UTF-8";
|
2
2
|
|
3
|
-
/// Provides a
|
3
|
+
/// Provides a concise method for targeting `padding` on specific sides of a
|
4
4
|
/// box. Use a `null` value to “skip” a side.
|
5
5
|
///
|
6
|
-
/// @argument {
|
7
|
-
/// List of padding values
|
6
|
+
/// @argument {list} $values
|
7
|
+
/// List of padding values; accepts CSS shorthand.
|
8
8
|
///
|
9
9
|
/// @example scss
|
10
10
|
/// .element-one {
|
11
11
|
/// @include padding(null 1rem);
|
12
12
|
/// }
|
13
13
|
///
|
14
|
-
///
|
15
|
-
/// @include padding(10vh null 10px 5%);
|
16
|
-
/// }
|
17
|
-
///
|
18
|
-
/// @example css
|
14
|
+
/// // CSS Output
|
19
15
|
/// .element-one {
|
20
16
|
/// padding-left: 1rem;
|
21
17
|
/// padding-right: 1rem;
|
22
18
|
/// }
|
23
19
|
///
|
20
|
+
/// @example scss
|
21
|
+
/// .element-two {
|
22
|
+
/// @include padding(10vh null 10px 5%);
|
23
|
+
/// }
|
24
|
+
///
|
25
|
+
/// // CSS Output
|
24
26
|
/// .element-two {
|
25
27
|
/// padding-bottom: 10px;
|
26
28
|
/// padding-left: 5%;
|
@@ -29,6 +31,6 @@
|
|
29
31
|
///
|
30
32
|
/// @require {mixin} _directional-property
|
31
33
|
|
32
|
-
@mixin padding($values
|
33
|
-
@include _directional-property(padding,
|
34
|
+
@mixin padding($values) {
|
35
|
+
@include _directional-property(padding, null, $values);
|
34
36
|
}
|
@@ -1,47 +1,57 @@
|
|
1
1
|
@charset "UTF-8";
|
2
2
|
|
3
|
-
/// Provides a
|
4
|
-
///
|
3
|
+
/// Provides a concise, one-line method for setting an element’s positioning
|
4
|
+
/// properties: `position`, `top`, `right`, `bottom` and `left`. Use a `null`
|
5
|
+
/// value to “skip” an edge of the box.
|
5
6
|
///
|
6
|
-
/// @argument {string} $position
|
7
|
+
/// @argument {string} $position
|
7
8
|
/// A CSS position value.
|
8
9
|
///
|
9
|
-
/// @argument {
|
10
|
-
/// List of lengths
|
10
|
+
/// @argument {list} $box-edge-values
|
11
|
+
/// List of lengths; accepts CSS shorthand.
|
11
12
|
///
|
12
13
|
/// @example scss
|
13
14
|
/// .element {
|
14
|
-
/// @include position(
|
15
|
+
/// @include position(relative, 0 null null 10em);
|
15
16
|
/// }
|
16
17
|
///
|
17
|
-
///
|
18
|
+
/// // CSS Output
|
18
19
|
/// .element {
|
19
20
|
/// left: 10em;
|
21
|
+
/// position: relative;
|
22
|
+
/// top: 0;
|
23
|
+
/// }
|
24
|
+
///
|
25
|
+
/// @example scss
|
26
|
+
/// .element {
|
27
|
+
/// @include position(absolute, 0);
|
28
|
+
/// }
|
29
|
+
///
|
30
|
+
/// // CSS Output
|
31
|
+
/// .element {
|
20
32
|
/// position: absolute;
|
21
33
|
/// top: 0;
|
34
|
+
/// right: 0;
|
35
|
+
/// bottom: 0;
|
36
|
+
/// left: 0;
|
22
37
|
/// }
|
23
38
|
///
|
24
39
|
/// @require {function} _is-length
|
25
40
|
///
|
26
|
-
/// @require {function} _unpack
|
41
|
+
/// @require {function} _unpack-shorthand
|
27
42
|
|
28
43
|
@mixin position(
|
29
|
-
$position
|
30
|
-
$
|
44
|
+
$position,
|
45
|
+
$box-edge-values
|
31
46
|
) {
|
32
47
|
|
33
|
-
|
34
|
-
$coordinates: $position;
|
35
|
-
$position: relative;
|
36
|
-
}
|
37
|
-
|
38
|
-
$coordinates: _unpack($coordinates);
|
48
|
+
$box-edge-values: _unpack-shorthand($box-edge-values);
|
39
49
|
|
40
50
|
$offsets: (
|
41
|
-
top: nth($
|
42
|
-
right: nth($
|
43
|
-
bottom: nth($
|
44
|
-
left: nth($
|
51
|
+
top: nth($box-edge-values, 1),
|
52
|
+
right: nth($box-edge-values, 2),
|
53
|
+
bottom: nth($box-edge-values, 3),
|
54
|
+
left: nth($box-edge-values, 4),
|
45
55
|
);
|
46
56
|
|
47
57
|
position: $position;
|
@@ -11,16 +11,18 @@
|
|
11
11
|
/// @include size(2em);
|
12
12
|
/// }
|
13
13
|
///
|
14
|
-
///
|
15
|
-
/// @include size(auto, 10em);
|
16
|
-
/// }
|
17
|
-
///
|
18
|
-
/// @example css
|
14
|
+
/// // CSS Output
|
19
15
|
/// .first-element {
|
20
16
|
/// width: 2em;
|
21
17
|
/// height: 2em;
|
22
18
|
/// }
|
23
19
|
///
|
20
|
+
/// @example scss
|
21
|
+
/// .second-element {
|
22
|
+
/// @include size(auto, 10em);
|
23
|
+
/// }
|
24
|
+
///
|
25
|
+
/// // CSS Output
|
24
26
|
/// .second-element {
|
25
27
|
/// width: auto;
|
26
28
|
/// height: 10em;
|
@@ -16,7 +16,7 @@
|
|
16
16
|
/// border: 1px solid #ccc;
|
17
17
|
/// }
|
18
18
|
///
|
19
|
-
///
|
19
|
+
/// // CSS Output
|
20
20
|
/// [type='color'],
|
21
21
|
/// [type='date'],
|
22
22
|
/// [type='datetime'],
|
@@ -47,7 +47,7 @@ $all-text-inputs: _assign-inputs($_text-inputs-list);
|
|
47
47
|
/// border: 1px solid #aaa;
|
48
48
|
/// }
|
49
49
|
///
|
50
|
-
///
|
50
|
+
/// // CSS Output
|
51
51
|
/// [type='color']:active,
|
52
52
|
/// [type='date']:active,
|
53
53
|
/// [type='datetime']:active,
|
@@ -78,7 +78,7 @@ $all-text-inputs-active: _assign-inputs($_text-inputs-list, active);
|
|
78
78
|
/// border: 1px solid #1565c0;
|
79
79
|
/// }
|
80
80
|
///
|
81
|
-
///
|
81
|
+
/// // CSS Output
|
82
82
|
/// [type='color']:focus,
|
83
83
|
/// [type='date']:focus,
|
84
84
|
/// [type='datetime']:focus,
|
@@ -109,7 +109,7 @@ $all-text-inputs-focus: _assign-inputs($_text-inputs-list, focus);
|
|
109
109
|
/// border: 1px solid #aaa;
|
110
110
|
/// }
|
111
111
|
///
|
112
|
-
///
|
112
|
+
/// // CSS Output
|
113
113
|
/// [type='color']:hover,
|
114
114
|
/// [type='date']:hover,
|
115
115
|
/// [type='datetime']:hover,
|
@@ -140,7 +140,7 @@ $all-text-inputs-hover: _assign-inputs($_text-inputs-list, hover);
|
|
140
140
|
/// border: 1px solid #00f;
|
141
141
|
/// }
|
142
142
|
///
|
143
|
-
///
|
143
|
+
/// // CSS Output
|
144
144
|
/// [type='color']:invalid,
|
145
145
|
/// [type='date']:invalid,
|
146
146
|
/// [type='datetime']:invalid,
|