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.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/.scss-lint.yml +8 -0
  3. data/NEWS.md +31 -9
  4. data/README.md +2 -2
  5. data/bourbon.gemspec +1 -1
  6. data/bower.json +9 -9
  7. data/core/_bourbon.scss +40 -38
  8. data/core/bourbon/{settings → helpers}/_scales.scss +0 -0
  9. data/core/bourbon/{addons → helpers}/_timing-functions.scss +0 -0
  10. data/core/bourbon/{addons → library}/_border-color.scss +0 -0
  11. data/core/bourbon/{addons → library}/_border-radius.scss +0 -0
  12. data/core/bourbon/{addons → library}/_border-style.scss +0 -0
  13. data/core/bourbon/{addons → library}/_border-width.scss +0 -0
  14. data/core/bourbon/{addons → library}/_buttons.scss +0 -0
  15. data/core/bourbon/{addons → library}/_clearfix.scss +0 -0
  16. data/core/bourbon/{addons → library}/_contrast-switch.scss +9 -9
  17. data/core/bourbon/{addons → library}/_ellipsis.scss +0 -0
  18. data/core/bourbon/{addons → library}/_font-face.scss +0 -0
  19. data/core/bourbon/{addons → library}/_font-stacks.scss +0 -0
  20. data/core/bourbon/{addons → library}/_hide-text.scss +0 -0
  21. data/core/bourbon/{addons → library}/_hide-visually.scss +0 -0
  22. data/core/bourbon/{addons → library}/_margin.scss +0 -0
  23. data/core/bourbon/{addons → library}/_modular-scale.scss +0 -0
  24. data/core/bourbon/{addons → library}/_padding.scss +0 -0
  25. data/core/bourbon/{addons → library}/_position.scss +0 -0
  26. data/core/bourbon/{addons → library}/_prefixer.scss +0 -0
  27. data/core/bourbon/{functions → library}/_shade.scss +0 -0
  28. data/core/bourbon/{addons → library}/_size.scss +4 -2
  29. data/core/bourbon/{functions → library}/_strip-unit.scss +0 -0
  30. data/core/bourbon/{addons → library}/_text-inputs.scss +0 -0
  31. data/core/bourbon/{functions → library}/_tint.scss +0 -0
  32. data/core/bourbon/library/_triangle.scss +79 -0
  33. data/core/bourbon/{addons → library}/_word-wrap.scss +0 -0
  34. data/core/bourbon/settings/_settings.scss +8 -0
  35. data/core/bourbon/{functions → utilities}/_assign-inputs.scss +0 -0
  36. data/core/bourbon/{settings → utilities}/_bourbon-get-setting.scss +0 -0
  37. data/core/bourbon/{functions → utilities}/_collapse-directionals.scss +0 -0
  38. data/core/bourbon/{helpers → utilities}/_directional-values.scss +0 -0
  39. data/core/bourbon/{functions → utilities}/_font-source-declaration.scss +0 -0
  40. data/core/bourbon/{functions → utilities}/_unpack.scss +0 -0
  41. data/core/bourbon/{functions → validators}/_contains-falsy.scss +0 -0
  42. data/core/bourbon/{functions → validators}/_contains.scss +0 -0
  43. data/core/bourbon/{functions → validators}/_is-length.scss +0 -0
  44. data/core/bourbon/{functions → validators}/_is-light.scss +3 -1
  45. data/core/bourbon/{functions → validators}/_is-number.scss +0 -0
  46. data/core/bourbon/{functions → validators}/_is-size.scss +0 -0
  47. data/features/step_definitions/bourbon_steps.rb +3 -2
  48. data/lib/bourbon.rb +2 -19
  49. data/lib/bourbon/version.rb +1 -1
  50. data/package.json +16 -16
  51. data/spec/bourbon/{addons → library}/border_color_spec.rb +1 -1
  52. data/spec/bourbon/{addons → library}/border_radius_spec.rb +1 -1
  53. data/spec/bourbon/{addons → library}/border_style_spec.rb +1 -1
  54. data/spec/bourbon/{addons → library}/border_width_spec.rb +1 -1
  55. data/spec/bourbon/{addons → library}/buttons_spec.rb +1 -1
  56. data/spec/bourbon/{addons → library}/clearfix_spec.rb +1 -1
  57. data/spec/bourbon/{addons → library}/contrast_switch_spec.rb +1 -1
  58. data/spec/bourbon/{addons → library}/ellipsis_spec.rb +1 -1
  59. data/spec/bourbon/{addons → library}/font_face_spec_1.rb +0 -0
  60. data/spec/bourbon/{addons → library}/font_face_spec_2.rb +0 -0
  61. data/spec/bourbon/{addons → library}/font_face_spec_3.rb +0 -0
  62. data/spec/bourbon/{addons → library}/font_face_spec_4.rb +0 -0
  63. data/spec/bourbon/{addons → library}/font_stacks_spec.rb +1 -1
  64. data/spec/bourbon/{addons → library}/hide_text_spec.rb +1 -1
  65. data/spec/bourbon/{addons → library}/hide_visually_spec.rb +1 -1
  66. data/spec/bourbon/{addons → library}/margin_spec.rb +1 -1
  67. data/spec/bourbon/{addons → library}/modular_scale_spec.rb +1 -1
  68. data/spec/bourbon/{addons → library}/padding_spec.rb +1 -1
  69. data/spec/bourbon/{addons → library}/position_spec.rb +1 -1
  70. data/spec/bourbon/{functions → library}/shade_spec.rb +1 -1
  71. data/spec/bourbon/{addons → library}/size_spec.rb +1 -1
  72. data/spec/bourbon/{functions → library}/strip_unit_spec.rb +1 -1
  73. data/spec/bourbon/{addons → library}/text_inputs_spec.rb +1 -1
  74. data/spec/bourbon/{functions → library}/tint_spec.rb +1 -1
  75. data/spec/bourbon/library/triangle_spec.rb +31 -0
  76. data/spec/bourbon/{addons → library}/word_wrap_spec.rb +1 -1
  77. data/spec/bourbon/{functions → utilities}/assign_inputs_spec.rb +1 -1
  78. data/spec/bourbon/{settings → utilities}/bourbon_get_setting_spec.rb +1 -1
  79. data/spec/bourbon/{functions → utilities}/collapse_directionals.rb +1 -1
  80. data/spec/bourbon/{helpers → utilities}/directional_values_spec.rb +1 -1
  81. data/spec/bourbon/{functions → utilities}/font_source_declaration_spec.rb +1 -1
  82. data/spec/bourbon/{functions → utilities}/unpack_spec.rb +1 -1
  83. data/spec/bourbon/{functions → validators}/contains_spec.rb +1 -1
  84. data/spec/bourbon/{functions → validators}/is_length_spec.rb +1 -1
  85. data/spec/bourbon/{functions → validators}/is_light_spec.rb +1 -1
  86. data/spec/bourbon/{functions → validators}/is_number_spec.rb +1 -1
  87. data/spec/bourbon/{functions → validators}/is_size_spec.rb +1 -1
  88. data/spec/fixtures/{addons → library}/border-color.scss +0 -0
  89. data/spec/fixtures/{addons → library}/border-radius.scss +0 -0
  90. data/spec/fixtures/{addons → library}/border-style.scss +0 -0
  91. data/spec/fixtures/{addons → library}/border-width.scss +0 -0
  92. data/spec/fixtures/{addons → library}/buttons.scss +0 -0
  93. data/spec/fixtures/{addons → library}/clearfix.scss +0 -0
  94. data/spec/fixtures/{addons → library}/contrast-switch.scss +0 -0
  95. data/spec/fixtures/{addons → library}/ellipsis.scss +0 -0
  96. data/spec/fixtures/{addons → library}/font-face-1.scss +0 -0
  97. data/spec/fixtures/{addons → library}/font-face-2.scss +0 -0
  98. data/spec/fixtures/{addons → library}/font-face-3.scss +0 -0
  99. data/spec/fixtures/{addons → library}/font-face-4.scss +0 -0
  100. data/spec/fixtures/{addons → library}/font-stacks.scss +0 -0
  101. data/spec/fixtures/{addons → library}/hide-text.scss +0 -0
  102. data/spec/fixtures/{addons → library}/hide-visually.scss +0 -0
  103. data/spec/fixtures/{addons → library}/margin.scss +0 -0
  104. data/spec/fixtures/{addons → library}/modular-scale.scss +0 -0
  105. data/spec/fixtures/{addons → library}/padding.scss +0 -0
  106. data/spec/fixtures/{addons → library}/position.scss +0 -0
  107. data/spec/fixtures/{functions → library}/shade.scss +0 -0
  108. data/spec/fixtures/{addons → library}/size.scss +0 -0
  109. data/spec/fixtures/{functions → library}/strip-unit.scss +0 -0
  110. data/spec/fixtures/{addons → library}/text-inputs.scss +0 -0
  111. data/spec/fixtures/{functions → library}/tint.scss +0 -0
  112. data/spec/fixtures/library/triangle.scss +9 -0
  113. data/spec/fixtures/{addons → library}/word-wrap.scss +0 -0
  114. data/spec/fixtures/{functions → utilities}/assign-inputs.scss +0 -0
  115. data/spec/fixtures/{settings → utilities}/bourbon-get-setting.scss +0 -0
  116. data/spec/fixtures/{functions → utilities}/collapse-directionals.scss +0 -0
  117. data/spec/fixtures/{helpers → utilities}/directional-values.scss +0 -0
  118. data/spec/fixtures/{functions → utilities}/font-source-declaration.scss +0 -0
  119. data/spec/fixtures/{functions → utilities}/unpack.scss +0 -0
  120. data/spec/fixtures/{functions → validators}/contains.scss +0 -0
  121. data/spec/fixtures/{functions → validators}/is-length.scss +0 -0
  122. data/spec/fixtures/{functions → validators}/is-light.scss +1 -1
  123. data/spec/fixtures/{functions → validators}/is-number.scss +0 -0
  124. data/spec/fixtures/{functions → validators}/is-size.scss +0 -0
  125. metadata +191 -187
  126. data/lib/bourbon/engine.rb +0 -5
  127. data/lib/tasks/install.rake +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0049bb742840704492f57b929d7c3df6d547b688
4
- data.tar.gz: df186a0c88d922d31829d0ebc24eb3e137c2908f
3
+ metadata.gz: e66aa96c86f786e36d15ae2b4653a8040465e92d
4
+ data.tar.gz: 7a54474eed24abc0b0a9b5339154d0b53be06506
5
5
  SHA512:
6
- metadata.gz: c0068eb60a455c7bd834902663c044b91df1042717f11c1db054588304c3ac8379ae314a0c8ea8cc10a4c347308d5647fd0fa254a2a0ac6d52c4ca674995ce8d
7
- data.tar.gz: ddfad619c7ca124897b4bed3e8d8ef86cd830b44bb8101dc268af8d58a68291c1be5413957a92eb8cd1b62cb744f8cd10e217726fa113eb5b4838a2643583808
6
+ metadata.gz: e02f2f45a76e60896c8471ec7a91c5c077aedfd2b75bc9aace42ee8031af89fae96b12bea394969fd884d69873bded2686c4c0315d3b756fda05970f1bec2fe8
7
+ data.tar.gz: e7a04a31131884169181e968bcc0a50b1c779b27f04e61a0225636038accdd066854ccd615bf46a4d2bb0b642f2dd0e02a86277297ceb0156f993b9fd244b193
@@ -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
- ## `master`
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
- ### Deprecated
53
+ ### Removed
34
54
 
35
55
  - The `$weight` and `$style` arguments in the `font-face` mixin have been
36
- deprecated. Instead, you can now include these—along with other CSS
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
- ### Deprecated
80
+ ### Removed
60
81
 
61
- - All vendor prefixing mixins have been deprecated. We recommend using a more
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 deprecated and the `prefixer` mixin
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 deprecated.
67
- - The `$monospace` font stack variable has been deprecated in favor of new
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 deprecated.
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.1+
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 3.1+
55
+ ## Installation for Ruby on Rails 4.2+
56
56
 
57
57
  1. Add Bourbon to your Gemfile:
58
58
 
@@ -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.44"
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
- "name": "bourbon",
2
+ "authors": [
3
+ "thoughtbot (http://thoughtbot.com)"
4
+ ],
3
5
  "description": "A simple and lightweight mixin library for Sass.",
4
- "version": "5.0.0-beta.1",
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
- "authors": [
31
- "thoughtbot (http://thoughtbot.com)"
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
  }
@@ -1,46 +1,48 @@
1
- // Bourbon 5.0.0-beta.1
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/settings/scales";
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/functions/assign-inputs";
11
- @import "bourbon/functions/collapse-directionals";
12
- @import "bourbon/functions/contains";
13
- @import "bourbon/functions/contains-falsy";
14
- @import "bourbon/functions/font-source-declaration";
15
- @import "bourbon/functions/is-length";
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/helpers/directional-values";
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/addons/border-color";
27
- @import "bourbon/addons/border-radius";
28
- @import "bourbon/addons/border-style";
29
- @import "bourbon/addons/border-width";
30
- @import "bourbon/addons/buttons";
31
- @import "bourbon/addons/clearfix";
32
- @import "bourbon/addons/contrast-switch";
33
- @import "bourbon/addons/ellipsis";
34
- @import "bourbon/addons/font-face";
35
- @import "bourbon/addons/font-stacks";
36
- @import "bourbon/addons/hide-text";
37
- @import "bourbon/addons/hide-visually";
38
- @import "bourbon/addons/margin";
39
- @import "bourbon/addons/modular-scale";
40
- @import "bourbon/addons/padding";
41
- @import "bourbon/addons/position";
42
- @import "bourbon/addons/prefixer";
43
- @import "bourbon/addons/size";
44
- @import "bourbon/addons/text-inputs";
45
- @import "bourbon/addons/timing-functions";
46
- @import "bourbon/addons/word-wrap";
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";
@@ -4,13 +4,13 @@
4
4
  /// for building button styles.
5
5
  ///
6
6
  /// @argument {color} $base-color
7
- /// The `color` to evaluate lightness against.
7
+ /// The color to evaluate lightness against.
8
8
  ///
9
- /// @argument {color} $light-color [#000]
10
- /// The `color` to be output when `base-color` is light.
9
+ /// @argument {color} $dark-color [#000]
10
+ /// The color to be output when `$base-color` is light.
11
11
  ///
12
- /// @argument {color} $dark-color [#fff]
13
- /// The `color` to be output when `base-color` is dark.
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} is-light
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
- $light-color: #000,
43
- $dark-color: #fff
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(is-light($base-color), $light-color, $dark-color);
46
+ @return if(_is-light($base-color), $dark-color, $light-color);
47
47
  }
@@ -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 in the `size` mixin.";
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 in the `size` mixin.";
46
+ @error "`#{$width}` is not a valid length for the `$width` parameter " +
47
+ "in the `size` mixin.";
46
48
  }
47
49
  }
@@ -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
+ }
@@ -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,