bourbon 5.0.0.beta.1 → 5.0.0.beta.2
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/.scss-lint.yml +8 -0
- data/NEWS.md +31 -9
- data/README.md +2 -2
- data/bourbon.gemspec +1 -1
- data/bower.json +9 -9
- data/core/_bourbon.scss +40 -38
- data/core/bourbon/{settings → helpers}/_scales.scss +0 -0
- data/core/bourbon/{addons → helpers}/_timing-functions.scss +0 -0
- data/core/bourbon/{addons → library}/_border-color.scss +0 -0
- data/core/bourbon/{addons → library}/_border-radius.scss +0 -0
- data/core/bourbon/{addons → library}/_border-style.scss +0 -0
- data/core/bourbon/{addons → library}/_border-width.scss +0 -0
- data/core/bourbon/{addons → library}/_buttons.scss +0 -0
- data/core/bourbon/{addons → library}/_clearfix.scss +0 -0
- data/core/bourbon/{addons → library}/_contrast-switch.scss +9 -9
- data/core/bourbon/{addons → library}/_ellipsis.scss +0 -0
- data/core/bourbon/{addons → library}/_font-face.scss +0 -0
- data/core/bourbon/{addons → library}/_font-stacks.scss +0 -0
- data/core/bourbon/{addons → library}/_hide-text.scss +0 -0
- data/core/bourbon/{addons → library}/_hide-visually.scss +0 -0
- data/core/bourbon/{addons → library}/_margin.scss +0 -0
- data/core/bourbon/{addons → library}/_modular-scale.scss +0 -0
- data/core/bourbon/{addons → library}/_padding.scss +0 -0
- data/core/bourbon/{addons → library}/_position.scss +0 -0
- data/core/bourbon/{addons → library}/_prefixer.scss +0 -0
- data/core/bourbon/{functions → library}/_shade.scss +0 -0
- data/core/bourbon/{addons → library}/_size.scss +4 -2
- data/core/bourbon/{functions → library}/_strip-unit.scss +0 -0
- data/core/bourbon/{addons → library}/_text-inputs.scss +0 -0
- data/core/bourbon/{functions → library}/_tint.scss +0 -0
- data/core/bourbon/library/_triangle.scss +79 -0
- data/core/bourbon/{addons → library}/_word-wrap.scss +0 -0
- data/core/bourbon/settings/_settings.scss +8 -0
- data/core/bourbon/{functions → utilities}/_assign-inputs.scss +0 -0
- data/core/bourbon/{settings → utilities}/_bourbon-get-setting.scss +0 -0
- data/core/bourbon/{functions → utilities}/_collapse-directionals.scss +0 -0
- data/core/bourbon/{helpers → utilities}/_directional-values.scss +0 -0
- data/core/bourbon/{functions → utilities}/_font-source-declaration.scss +0 -0
- data/core/bourbon/{functions → utilities}/_unpack.scss +0 -0
- data/core/bourbon/{functions → validators}/_contains-falsy.scss +0 -0
- data/core/bourbon/{functions → validators}/_contains.scss +0 -0
- data/core/bourbon/{functions → validators}/_is-length.scss +0 -0
- data/core/bourbon/{functions → validators}/_is-light.scss +3 -1
- data/core/bourbon/{functions → validators}/_is-number.scss +0 -0
- data/core/bourbon/{functions → validators}/_is-size.scss +0 -0
- data/features/step_definitions/bourbon_steps.rb +3 -2
- data/lib/bourbon.rb +2 -19
- data/lib/bourbon/version.rb +1 -1
- data/package.json +16 -16
- data/spec/bourbon/{addons → library}/border_color_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/border_radius_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/border_style_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/border_width_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/buttons_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/clearfix_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/contrast_switch_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/ellipsis_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/font_face_spec_1.rb +0 -0
- data/spec/bourbon/{addons → library}/font_face_spec_2.rb +0 -0
- data/spec/bourbon/{addons → library}/font_face_spec_3.rb +0 -0
- data/spec/bourbon/{addons → library}/font_face_spec_4.rb +0 -0
- data/spec/bourbon/{addons → library}/font_stacks_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/hide_text_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/hide_visually_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/margin_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/modular_scale_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/padding_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/position_spec.rb +1 -1
- data/spec/bourbon/{functions → library}/shade_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/size_spec.rb +1 -1
- data/spec/bourbon/{functions → library}/strip_unit_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/text_inputs_spec.rb +1 -1
- data/spec/bourbon/{functions → library}/tint_spec.rb +1 -1
- data/spec/bourbon/library/triangle_spec.rb +31 -0
- data/spec/bourbon/{addons → library}/word_wrap_spec.rb +1 -1
- data/spec/bourbon/{functions → utilities}/assign_inputs_spec.rb +1 -1
- data/spec/bourbon/{settings → utilities}/bourbon_get_setting_spec.rb +1 -1
- data/spec/bourbon/{functions → utilities}/collapse_directionals.rb +1 -1
- data/spec/bourbon/{helpers → utilities}/directional_values_spec.rb +1 -1
- data/spec/bourbon/{functions → utilities}/font_source_declaration_spec.rb +1 -1
- data/spec/bourbon/{functions → utilities}/unpack_spec.rb +1 -1
- data/spec/bourbon/{functions → validators}/contains_spec.rb +1 -1
- data/spec/bourbon/{functions → validators}/is_length_spec.rb +1 -1
- data/spec/bourbon/{functions → validators}/is_light_spec.rb +1 -1
- data/spec/bourbon/{functions → validators}/is_number_spec.rb +1 -1
- data/spec/bourbon/{functions → validators}/is_size_spec.rb +1 -1
- data/spec/fixtures/{addons → library}/border-color.scss +0 -0
- data/spec/fixtures/{addons → library}/border-radius.scss +0 -0
- data/spec/fixtures/{addons → library}/border-style.scss +0 -0
- data/spec/fixtures/{addons → library}/border-width.scss +0 -0
- data/spec/fixtures/{addons → library}/buttons.scss +0 -0
- data/spec/fixtures/{addons → library}/clearfix.scss +0 -0
- data/spec/fixtures/{addons → library}/contrast-switch.scss +0 -0
- data/spec/fixtures/{addons → library}/ellipsis.scss +0 -0
- data/spec/fixtures/{addons → library}/font-face-1.scss +0 -0
- data/spec/fixtures/{addons → library}/font-face-2.scss +0 -0
- data/spec/fixtures/{addons → library}/font-face-3.scss +0 -0
- data/spec/fixtures/{addons → library}/font-face-4.scss +0 -0
- data/spec/fixtures/{addons → library}/font-stacks.scss +0 -0
- data/spec/fixtures/{addons → library}/hide-text.scss +0 -0
- data/spec/fixtures/{addons → library}/hide-visually.scss +0 -0
- data/spec/fixtures/{addons → library}/margin.scss +0 -0
- data/spec/fixtures/{addons → library}/modular-scale.scss +0 -0
- data/spec/fixtures/{addons → library}/padding.scss +0 -0
- data/spec/fixtures/{addons → library}/position.scss +0 -0
- data/spec/fixtures/{functions → library}/shade.scss +0 -0
- data/spec/fixtures/{addons → library}/size.scss +0 -0
- data/spec/fixtures/{functions → library}/strip-unit.scss +0 -0
- data/spec/fixtures/{addons → library}/text-inputs.scss +0 -0
- data/spec/fixtures/{functions → library}/tint.scss +0 -0
- data/spec/fixtures/library/triangle.scss +9 -0
- data/spec/fixtures/{addons → library}/word-wrap.scss +0 -0
- data/spec/fixtures/{functions → utilities}/assign-inputs.scss +0 -0
- data/spec/fixtures/{settings → utilities}/bourbon-get-setting.scss +0 -0
- data/spec/fixtures/{functions → utilities}/collapse-directionals.scss +0 -0
- data/spec/fixtures/{helpers → utilities}/directional-values.scss +0 -0
- data/spec/fixtures/{functions → utilities}/font-source-declaration.scss +0 -0
- data/spec/fixtures/{functions → utilities}/unpack.scss +0 -0
- data/spec/fixtures/{functions → validators}/contains.scss +0 -0
- data/spec/fixtures/{functions → validators}/is-length.scss +0 -0
- data/spec/fixtures/{functions → validators}/is-light.scss +1 -1
- data/spec/fixtures/{functions → validators}/is-number.scss +0 -0
- data/spec/fixtures/{functions → validators}/is-size.scss +0 -0
- metadata +191 -187
- data/lib/bourbon/engine.rb +0 -5
- data/lib/tasks/install.rake +0 -20
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e66aa96c86f786e36d15ae2b4653a8040465e92d
|
|
4
|
+
data.tar.gz: 7a54474eed24abc0b0a9b5339154d0b53be06506
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e02f2f45a76e60896c8471ec7a91c5c077aedfd2b75bc9aace42ee8031af89fae96b12bea394969fd884d69873bded2686c4c0315d3b756fda05970f1bec2fe8
|
|
7
|
+
data.tar.gz: e7a04a31131884169181e968bcc0a50b1c779b27f04e61a0225636038accdd066854ccd615bf46a4d2bb0b642f2dd0e02a86277297ceb0156f993b9fd244b193
|
data/.scss-lint.yml
CHANGED
|
@@ -107,6 +107,10 @@ linters:
|
|
|
107
107
|
PlaceholderInExtend:
|
|
108
108
|
enabled: true
|
|
109
109
|
|
|
110
|
+
PrivateNamingConvention:
|
|
111
|
+
enabled: false
|
|
112
|
+
prefix: _
|
|
113
|
+
|
|
110
114
|
PropertyCount:
|
|
111
115
|
enabled: false
|
|
112
116
|
|
|
@@ -174,6 +178,10 @@ linters:
|
|
|
174
178
|
SpaceAfterPropertyName:
|
|
175
179
|
enabled: true
|
|
176
180
|
|
|
181
|
+
SpaceAfterVariableColon:
|
|
182
|
+
enabled: true
|
|
183
|
+
style: at_least_one_space
|
|
184
|
+
|
|
177
185
|
SpaceAfterVariableName:
|
|
178
186
|
enabled: true
|
|
179
187
|
|
data/NEWS.md
CHANGED
|
@@ -3,7 +3,27 @@
|
|
|
3
3
|
The noteworthy changes for each Bourbon version are included here. For a
|
|
4
4
|
complete changelog, see the Git history for each version via the version links.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## [5.0.0-beta.2] - March 3, 2016
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- Added global settings for the `contrast-switch` mixin:
|
|
11
|
+
`contrast-switch-dark-color` & `contrast-switch-light-color`.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Swapped argument names `contrast-switch`; what was `$dark-color` is now
|
|
16
|
+
`$light-color` and what was `$light-color` is now `$dark-color`.
|
|
17
|
+
|
|
18
|
+
### Removed
|
|
19
|
+
|
|
20
|
+
- Dropped support for Ruby on Rails versions older than 4.2.
|
|
21
|
+
- Dropped support for LibSass versions older than 3.3.
|
|
22
|
+
- The `is-light` function is now private.
|
|
23
|
+
|
|
24
|
+
[5.0.0-beta.2]: https://github.com/thoughtbot/bourbon/compare/v5.0.0.beta.1...v5.0.0.beta.2
|
|
25
|
+
|
|
26
|
+
## [5.0.0-beta.1] - February 9, 2016
|
|
7
27
|
|
|
8
28
|
### Added
|
|
9
29
|
|
|
@@ -30,13 +50,14 @@ complete changelog, see the Git history for each version via the version links.
|
|
|
30
50
|
See [4e43c2d].
|
|
31
51
|
- The `clearfix` mixin now uses `block` display, instead of `table`.
|
|
32
52
|
|
|
33
|
-
###
|
|
53
|
+
### Removed
|
|
34
54
|
|
|
35
55
|
- The `$weight` and `$style` arguments in the `font-face` mixin have been
|
|
36
|
-
|
|
56
|
+
removed. Instead, you can now include these—along with other CSS
|
|
37
57
|
properties—within the mixin block and they’ll be output as part of the
|
|
38
58
|
`@font-face` declaration.
|
|
39
59
|
|
|
60
|
+
[5.0.0-beta.1]: https://github.com/thoughtbot/bourbon/compare/da4451e...v5.0.0.beta.1
|
|
40
61
|
[2356719]: https://github.com/thoughtbot/bourbon/commit/235671948ef3a9c343c4391d250082a0373c8d83
|
|
41
62
|
[4e43c2d]: https://github.com/thoughtbot/bourbon/commit/4e43c2d7507999b539771bdc1b3733b18b3c1883
|
|
42
63
|
|
|
@@ -56,16 +77,17 @@ complete changelog, see the Git history for each version via the version links.
|
|
|
56
77
|
- The `size` mixin now requires a comma-separated argument list,
|
|
57
78
|
e.g. `@include size(1em, 2em);`.
|
|
58
79
|
|
|
59
|
-
###
|
|
80
|
+
### Removed
|
|
60
81
|
|
|
61
|
-
- All vendor prefixing mixins have been
|
|
82
|
+
- All vendor prefixing mixins have been removed. We recommend using a more
|
|
62
83
|
robust and maintainable solution
|
|
63
84
|
like [Autoprefixer](https://github.com/postcss/autoprefixer).
|
|
64
|
-
- The `$global-prefixes` setting has been
|
|
85
|
+
- The `$global-prefixes` setting has been removed and the `prefixer` mixin
|
|
65
86
|
has been refactored and no longer uses it.
|
|
66
|
-
- The `em` and `rem` mixins have been
|
|
67
|
-
- The `$monospace` font stack variable has been
|
|
87
|
+
- The `em` and `rem` mixins have been removed.
|
|
88
|
+
- The `$monospace` font stack variable has been removed in favor of new
|
|
68
89
|
`$consolas`, `$courier-new` and `$monaco` variables.
|
|
69
|
-
- The `triangle` mixin has been
|
|
90
|
+
- The `triangle` mixin has been removed.
|
|
91
|
+
- The `retina-image` mixin has been removed.
|
|
70
92
|
|
|
71
93
|
[5.0.0.alpha.0]: https://github.com/thoughtbot/bourbon/compare/v4.2.6...v5.0.0.alpha.0
|
data/README.md
CHANGED
|
@@ -18,7 +18,7 @@ for updates.
|
|
|
18
18
|
|
|
19
19
|
## Requirements
|
|
20
20
|
|
|
21
|
-
- [Sass](https://github.com/sass/sass) 3.4+ or [LibSass](https://github.com/sass/libsass) 3.
|
|
21
|
+
- [Sass](https://github.com/sass/sass) 3.4+ or [LibSass](https://github.com/sass/libsass) 3.3+
|
|
22
22
|
|
|
23
23
|
## Installation
|
|
24
24
|
|
|
@@ -52,7 +52,7 @@ For command line help, visit our wiki page on Bourbon’s [command line interfac
|
|
|
52
52
|
|
|
53
53
|
It’s not recommended to add or modify the Bourbon files so that you can update them easily.
|
|
54
54
|
|
|
55
|
-
## Installation for Ruby on Rails
|
|
55
|
+
## Installation for Ruby on Rails 4.2+
|
|
56
56
|
|
|
57
57
|
1. Add Bourbon to your Gemfile:
|
|
58
58
|
|
data/bourbon.gemspec
CHANGED
|
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
|
|
|
6
6
|
s.add_development_dependency "css_parser", "~> 1.3"
|
|
7
7
|
s.add_development_dependency "rake", "~> 10.4"
|
|
8
8
|
s.add_development_dependency "rspec", "~> 3.3"
|
|
9
|
-
s.add_development_dependency "scss_lint", "0.
|
|
9
|
+
s.add_development_dependency "scss_lint", "0.47"
|
|
10
10
|
s.add_runtime_dependency "sass", "~> 3.4"
|
|
11
11
|
s.add_runtime_dependency "thor", "~> 0.19"
|
|
12
12
|
s.authors = [
|
data/bower.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"authors": [
|
|
3
|
+
"thoughtbot (http://thoughtbot.com)"
|
|
4
|
+
],
|
|
3
5
|
"description": "A simple and lightweight mixin library for Sass.",
|
|
4
|
-
"
|
|
5
|
-
"main": "core/_bourbon.scss",
|
|
6
|
-
"license": "MIT",
|
|
6
|
+
"homepage": "http://bourbon.io",
|
|
7
7
|
"ignore": [
|
|
8
8
|
"**/.*",
|
|
9
9
|
"_site",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"sass",
|
|
28
28
|
"scss"
|
|
29
29
|
],
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"homepage": "http://bourbon.io",
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"main": "core/_bourbon.scss",
|
|
32
|
+
"name": "bourbon",
|
|
34
33
|
"repository": {
|
|
35
34
|
"type": "git",
|
|
36
35
|
"url": "https://github.com/thoughtbot/bourbon.git"
|
|
37
|
-
}
|
|
36
|
+
},
|
|
37
|
+
"version": "5.0.0-beta.2"
|
|
38
38
|
}
|
data/core/_bourbon.scss
CHANGED
|
@@ -1,46 +1,48 @@
|
|
|
1
|
-
// Bourbon 5.0.0-beta.
|
|
1
|
+
// Bourbon 5.0.0-beta.2
|
|
2
2
|
// http://bourbon.io
|
|
3
3
|
// Copyright 2011 thoughtbot, inc.
|
|
4
4
|
// MIT License
|
|
5
5
|
|
|
6
|
-
@import "bourbon/
|
|
6
|
+
@import "bourbon/helpers/scales";
|
|
7
|
+
@import "bourbon/helpers/timing-functions";
|
|
8
|
+
|
|
7
9
|
@import "bourbon/settings/settings";
|
|
8
|
-
@import "bourbon/settings/bourbon-get-setting";
|
|
9
10
|
|
|
10
|
-
@import "bourbon/
|
|
11
|
-
@import "bourbon/
|
|
12
|
-
@import "bourbon/
|
|
13
|
-
@import "bourbon/
|
|
14
|
-
@import "bourbon/
|
|
15
|
-
@import "bourbon/
|
|
16
|
-
@import "bourbon/functions/is-light";
|
|
17
|
-
@import "bourbon/functions/is-number";
|
|
18
|
-
@import "bourbon/functions/is-size";
|
|
19
|
-
@import "bourbon/functions/shade";
|
|
20
|
-
@import "bourbon/functions/strip-unit";
|
|
21
|
-
@import "bourbon/functions/tint";
|
|
22
|
-
@import "bourbon/functions/unpack";
|
|
11
|
+
@import "bourbon/validators/contains";
|
|
12
|
+
@import "bourbon/validators/contains-falsy";
|
|
13
|
+
@import "bourbon/validators/is-length";
|
|
14
|
+
@import "bourbon/validators/is-light";
|
|
15
|
+
@import "bourbon/validators/is-number";
|
|
16
|
+
@import "bourbon/validators/is-size";
|
|
23
17
|
|
|
24
|
-
@import "bourbon/
|
|
18
|
+
@import "bourbon/utilities/assign-inputs";
|
|
19
|
+
@import "bourbon/utilities/bourbon-get-setting";
|
|
20
|
+
@import "bourbon/utilities/collapse-directionals";
|
|
21
|
+
@import "bourbon/utilities/directional-values";
|
|
22
|
+
@import "bourbon/utilities/font-source-declaration";
|
|
23
|
+
@import "bourbon/utilities/unpack";
|
|
25
24
|
|
|
26
|
-
@import "bourbon/
|
|
27
|
-
@import "bourbon/
|
|
28
|
-
@import "bourbon/
|
|
29
|
-
@import "bourbon/
|
|
30
|
-
@import "bourbon/
|
|
31
|
-
@import "bourbon/
|
|
32
|
-
@import "bourbon/
|
|
33
|
-
@import "bourbon/
|
|
34
|
-
@import "bourbon/
|
|
35
|
-
@import "bourbon/
|
|
36
|
-
@import "bourbon/
|
|
37
|
-
@import "bourbon/
|
|
38
|
-
@import "bourbon/
|
|
39
|
-
@import "bourbon/
|
|
40
|
-
@import "bourbon/
|
|
41
|
-
@import "bourbon/
|
|
42
|
-
@import "bourbon/
|
|
43
|
-
@import "bourbon/
|
|
44
|
-
@import "bourbon/
|
|
45
|
-
@import "bourbon/
|
|
46
|
-
@import "bourbon/
|
|
25
|
+
@import "bourbon/library/border-color";
|
|
26
|
+
@import "bourbon/library/border-radius";
|
|
27
|
+
@import "bourbon/library/border-style";
|
|
28
|
+
@import "bourbon/library/border-width";
|
|
29
|
+
@import "bourbon/library/buttons";
|
|
30
|
+
@import "bourbon/library/clearfix";
|
|
31
|
+
@import "bourbon/library/contrast-switch";
|
|
32
|
+
@import "bourbon/library/ellipsis";
|
|
33
|
+
@import "bourbon/library/font-face";
|
|
34
|
+
@import "bourbon/library/font-stacks";
|
|
35
|
+
@import "bourbon/library/hide-text";
|
|
36
|
+
@import "bourbon/library/hide-visually";
|
|
37
|
+
@import "bourbon/library/margin";
|
|
38
|
+
@import "bourbon/library/modular-scale";
|
|
39
|
+
@import "bourbon/library/padding";
|
|
40
|
+
@import "bourbon/library/position";
|
|
41
|
+
@import "bourbon/library/prefixer";
|
|
42
|
+
@import "bourbon/library/shade";
|
|
43
|
+
@import "bourbon/library/size";
|
|
44
|
+
@import "bourbon/library/strip-unit";
|
|
45
|
+
@import "bourbon/library/text-inputs";
|
|
46
|
+
@import "bourbon/library/tint";
|
|
47
|
+
@import "bourbon/library/triangle";
|
|
48
|
+
@import "bourbon/library/word-wrap";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
/// for building button styles.
|
|
5
5
|
///
|
|
6
6
|
/// @argument {color} $base-color
|
|
7
|
-
/// The
|
|
7
|
+
/// The color to evaluate lightness against.
|
|
8
8
|
///
|
|
9
|
-
/// @argument {color} $
|
|
10
|
-
/// The
|
|
9
|
+
/// @argument {color} $dark-color [#000]
|
|
10
|
+
/// The color to be output when `$base-color` is light.
|
|
11
11
|
///
|
|
12
|
-
/// @argument {color} $
|
|
13
|
-
/// The
|
|
12
|
+
/// @argument {color} $light-color [#fff]
|
|
13
|
+
/// The color to be output when `$base-color` is dark.
|
|
14
14
|
///
|
|
15
15
|
/// @example scss
|
|
16
16
|
/// .first-element {
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
/// color: #eee;
|
|
34
34
|
/// }
|
|
35
35
|
///
|
|
36
|
-
/// @require {function}
|
|
36
|
+
/// @require {function} _is-light
|
|
37
37
|
///
|
|
38
38
|
/// @since 5.0.0
|
|
39
39
|
|
|
40
40
|
@function contrast-switch(
|
|
41
41
|
$base-color,
|
|
42
|
-
$
|
|
43
|
-
$
|
|
42
|
+
$dark-color: _bourbon-get-setting("contrast-switch-dark-color"),
|
|
43
|
+
$light-color: _bourbon-get-setting("contrast-switch-light-color")
|
|
44
44
|
) {
|
|
45
45
|
|
|
46
|
-
@return if(
|
|
46
|
+
@return if(_is-light($base-color), $dark-color, $light-color);
|
|
47
47
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -36,12 +36,14 @@
|
|
|
36
36
|
@if _is-size($height) {
|
|
37
37
|
height: $height;
|
|
38
38
|
} @else {
|
|
39
|
-
@error "`#{$height}` is not a valid length for the `$height` parameter
|
|
39
|
+
@error "`#{$height}` is not a valid length for the `$height` parameter " +
|
|
40
|
+
"in the `size` mixin.";
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
@if _is-size($width) {
|
|
43
44
|
width: $width;
|
|
44
45
|
} @else {
|
|
45
|
-
@error "`#{$width}` is not a valid length for the `$width` parameter
|
|
46
|
+
@error "`#{$width}` is not a valid length for the `$width` parameter " +
|
|
47
|
+
"in the `size` mixin.";
|
|
46
48
|
}
|
|
47
49
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
/// Generates a triangle pointing in a specified direction.
|
|
4
|
+
///
|
|
5
|
+
/// @argument {string} $direction [up]
|
|
6
|
+
/// The direction the triangle should point. Accepts `up`, `up-right`,
|
|
7
|
+
/// `right`, `down-right`, `down`, `down-left`, `left` or `up-left`.
|
|
8
|
+
///
|
|
9
|
+
/// @argument {color} $color [currentColor]
|
|
10
|
+
/// Color of the triangle.
|
|
11
|
+
///
|
|
12
|
+
/// @argument {number (with unit)} $width [1rem]
|
|
13
|
+
/// Width of the triangle.
|
|
14
|
+
///
|
|
15
|
+
/// @argument {number (with unit)} $height [($width / 2)]
|
|
16
|
+
/// Height of the triangle.
|
|
17
|
+
///
|
|
18
|
+
/// @example scss
|
|
19
|
+
/// .element {
|
|
20
|
+
/// &::before {
|
|
21
|
+
/// @include triangle(up, #b25c9c, 2rem);
|
|
22
|
+
/// content: "";
|
|
23
|
+
/// }
|
|
24
|
+
/// }
|
|
25
|
+
///
|
|
26
|
+
/// @example css
|
|
27
|
+
/// .element::before {
|
|
28
|
+
/// border-style: solid;
|
|
29
|
+
/// height: 0;
|
|
30
|
+
/// width: 0;
|
|
31
|
+
/// border-color: transparent transparent #b25c9c transparent;
|
|
32
|
+
/// border-width: 0 1rem 1rem;
|
|
33
|
+
/// content: "";
|
|
34
|
+
/// }
|
|
35
|
+
|
|
36
|
+
@mixin triangle(
|
|
37
|
+
$direction: up,
|
|
38
|
+
$color: currentColor,
|
|
39
|
+
$width: 1rem,
|
|
40
|
+
$height: ($width / 2)
|
|
41
|
+
) {
|
|
42
|
+
@if not index(
|
|
43
|
+
"up" "up-right" "right" "down-right" "down" "down-left" "left" "up-left",
|
|
44
|
+
$direction
|
|
45
|
+
) {
|
|
46
|
+
@error "Direction must be `up`, `up-right`, `right`, `down-right`, " +
|
|
47
|
+
"`down`, `down-left`, `left` or `up-left`.";
|
|
48
|
+
} @else {
|
|
49
|
+
border-style: solid;
|
|
50
|
+
height: 0;
|
|
51
|
+
width: 0;
|
|
52
|
+
|
|
53
|
+
@if $direction == "up" {
|
|
54
|
+
border-color: transparent transparent $color;
|
|
55
|
+
border-width: 0 ($width / 2) $height;
|
|
56
|
+
} @else if $direction == "up-right" {
|
|
57
|
+
border-color: transparent $color transparent transparent;
|
|
58
|
+
border-width: 0 $width $width 0;
|
|
59
|
+
} @else if $direction == "right" {
|
|
60
|
+
border-color: transparent transparent transparent $color;
|
|
61
|
+
border-width: ($height / 2) 0 ($height / 2) $width;
|
|
62
|
+
} @else if $direction == "down-right" {
|
|
63
|
+
border-color: transparent transparent $color;
|
|
64
|
+
border-width: 0 0 $width $width;
|
|
65
|
+
} @else if $direction == "down" {
|
|
66
|
+
border-color: $color transparent transparent;
|
|
67
|
+
border-width: $height ($width / 2) 0;
|
|
68
|
+
} @else if $direction == "down-left" {
|
|
69
|
+
border-color: transparent transparent transparent $color;
|
|
70
|
+
border-width: $width 0 0 $width;
|
|
71
|
+
} @else if $direction == "left" {
|
|
72
|
+
border-color: transparent $color transparent transparent;
|
|
73
|
+
border-width: ($height / 2) $width ($height / 2) 0;
|
|
74
|
+
} @else if $direction == "up-left" {
|
|
75
|
+
border-color: $color transparent transparent;
|
|
76
|
+
border-width: $width $width 0 0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
File without changes
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
///
|
|
5
5
|
/// @type map
|
|
6
6
|
///
|
|
7
|
+
/// @property {color} contrast-switch-dark-color [#000]
|
|
8
|
+
/// Global dark color for the `contrast-switch` function.
|
|
9
|
+
///
|
|
10
|
+
/// @property {color} contrast-switch-light-color [#fff]
|
|
11
|
+
/// Global light color for the `contrast-switch` function.
|
|
12
|
+
///
|
|
7
13
|
/// @property {list} global-font-file-formats [("ttf", "woff2", "woff")]
|
|
8
14
|
/// Global font file formats for the `font-face` mixin.
|
|
9
15
|
///
|
|
@@ -20,6 +26,8 @@
|
|
|
20
26
|
/// @access private
|
|
21
27
|
|
|
22
28
|
$_bourbon-defaults: (
|
|
29
|
+
"contrast-switch-dark-color": #000,
|
|
30
|
+
"contrast-switch-light-color": #fff,
|
|
23
31
|
"global-font-file-formats": ("ttf", "woff2", "woff"),
|
|
24
32
|
"modular-scale-base": 1em,
|
|
25
33
|
"modular-scale-ratio": $major-third,
|