english_tea 0.6.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/english_tea.scss +0 -12
  3. data/app/assets/stylesheets/english_tea/modules.scss +1 -0
  4. data/{vendor/assets/stylesheets/snapper.scss → app/assets/stylesheets/english_tea/modules/_snapper.scss} +0 -0
  5. data/app/assets/stylesheets/english_tea/setup/_mixins.scss +486 -0
  6. data/lib/english_tea/version.rb +1 -1
  7. data/vendor/bourbon/LICENSE +21 -0
  8. data/vendor/snapper/LICENSE +21 -0
  9. metadata +5 -83
  10. data/vendor/assets/stylesheets/bourbon.scss +0 -91
  11. data/vendor/assets/stylesheets/bourbon/_bourbon-deprecate.scss +0 -19
  12. data/vendor/assets/stylesheets/bourbon/_bourbon-deprecated-upcoming.scss +0 -425
  13. data/vendor/assets/stylesheets/bourbon/addons/_border-color.scss +0 -29
  14. data/vendor/assets/stylesheets/bourbon/addons/_border-radius.scss +0 -48
  15. data/vendor/assets/stylesheets/bourbon/addons/_border-style.scss +0 -28
  16. data/vendor/assets/stylesheets/bourbon/addons/_border-width.scss +0 -28
  17. data/vendor/assets/stylesheets/bourbon/addons/_buttons.scss +0 -69
  18. data/vendor/assets/stylesheets/bourbon/addons/_clearfix.scss +0 -25
  19. data/vendor/assets/stylesheets/bourbon/addons/_ellipsis.scss +0 -30
  20. data/vendor/assets/stylesheets/bourbon/addons/_font-stacks.scss +0 -31
  21. data/vendor/assets/stylesheets/bourbon/addons/_hide-text.scss +0 -27
  22. data/vendor/assets/stylesheets/bourbon/addons/_margin.scss +0 -29
  23. data/vendor/assets/stylesheets/bourbon/addons/_padding.scss +0 -29
  24. data/vendor/assets/stylesheets/bourbon/addons/_position.scss +0 -51
  25. data/vendor/assets/stylesheets/bourbon/addons/_prefixer.scss +0 -66
  26. data/vendor/assets/stylesheets/bourbon/addons/_retina-image.scss +0 -27
  27. data/vendor/assets/stylesheets/bourbon/addons/_size.scss +0 -56
  28. data/vendor/assets/stylesheets/bourbon/addons/_text-inputs.scss +0 -118
  29. data/vendor/assets/stylesheets/bourbon/addons/_timing-functions.scss +0 -34
  30. data/vendor/assets/stylesheets/bourbon/addons/_triangle.scss +0 -63
  31. data/vendor/assets/stylesheets/bourbon/addons/_word-wrap.scss +0 -29
  32. data/vendor/assets/stylesheets/bourbon/css3/_animation.scss +0 -61
  33. data/vendor/assets/stylesheets/bourbon/css3/_appearance.scss +0 -5
  34. data/vendor/assets/stylesheets/bourbon/css3/_backface-visibility.scss +0 -5
  35. data/vendor/assets/stylesheets/bourbon/css3/_background-image.scss +0 -44
  36. data/vendor/assets/stylesheets/bourbon/css3/_background.scss +0 -57
  37. data/vendor/assets/stylesheets/bourbon/css3/_border-image.scss +0 -61
  38. data/vendor/assets/stylesheets/bourbon/css3/_calc.scss +0 -6
  39. data/vendor/assets/stylesheets/bourbon/css3/_columns.scss +0 -67
  40. data/vendor/assets/stylesheets/bourbon/css3/_filter.scss +0 -6
  41. data/vendor/assets/stylesheets/bourbon/css3/_flex-box.scss +0 -327
  42. data/vendor/assets/stylesheets/bourbon/css3/_font-face.scss +0 -29
  43. data/vendor/assets/stylesheets/bourbon/css3/_font-feature-settings.scss +0 -6
  44. data/vendor/assets/stylesheets/bourbon/css3/_hidpi-media-query.scss +0 -12
  45. data/vendor/assets/stylesheets/bourbon/css3/_hyphens.scss +0 -6
  46. data/vendor/assets/stylesheets/bourbon/css3/_image-rendering.scss +0 -15
  47. data/vendor/assets/stylesheets/bourbon/css3/_keyframes.scss +0 -38
  48. data/vendor/assets/stylesheets/bourbon/css3/_linear-gradient.scss +0 -40
  49. data/vendor/assets/stylesheets/bourbon/css3/_perspective.scss +0 -12
  50. data/vendor/assets/stylesheets/bourbon/css3/_placeholder.scss +0 -10
  51. data/vendor/assets/stylesheets/bourbon/css3/_radial-gradient.scss +0 -40
  52. data/vendor/assets/stylesheets/bourbon/css3/_selection.scss +0 -44
  53. data/vendor/assets/stylesheets/bourbon/css3/_text-decoration.scss +0 -27
  54. data/vendor/assets/stylesheets/bourbon/css3/_transform.scss +0 -21
  55. data/vendor/assets/stylesheets/bourbon/css3/_transition.scss +0 -81
  56. data/vendor/assets/stylesheets/bourbon/css3/_user-select.scss +0 -5
  57. data/vendor/assets/stylesheets/bourbon/functions/_assign-inputs.scss +0 -16
  58. data/vendor/assets/stylesheets/bourbon/functions/_contains-falsy.scss +0 -25
  59. data/vendor/assets/stylesheets/bourbon/functions/_contains.scss +0 -31
  60. data/vendor/assets/stylesheets/bourbon/functions/_is-length.scss +0 -16
  61. data/vendor/assets/stylesheets/bourbon/functions/_is-light.scss +0 -26
  62. data/vendor/assets/stylesheets/bourbon/functions/_is-number.scss +0 -16
  63. data/vendor/assets/stylesheets/bourbon/functions/_is-size.scss +0 -23
  64. data/vendor/assets/stylesheets/bourbon/functions/_modular-scale.scss +0 -74
  65. data/vendor/assets/stylesheets/bourbon/functions/_px-to-em.scss +0 -24
  66. data/vendor/assets/stylesheets/bourbon/functions/_px-to-rem.scss +0 -26
  67. data/vendor/assets/stylesheets/bourbon/functions/_shade.scss +0 -24
  68. data/vendor/assets/stylesheets/bourbon/functions/_strip-units.scss +0 -22
  69. data/vendor/assets/stylesheets/bourbon/functions/_tint.scss +0 -24
  70. data/vendor/assets/stylesheets/bourbon/functions/_transition-property-name.scss +0 -37
  71. data/vendor/assets/stylesheets/bourbon/functions/_unpack.scss +0 -32
  72. data/vendor/assets/stylesheets/bourbon/helpers/_convert-units.scss +0 -26
  73. data/vendor/assets/stylesheets/bourbon/helpers/_directional-values.scss +0 -108
  74. data/vendor/assets/stylesheets/bourbon/helpers/_font-source-declaration.scss +0 -53
  75. data/vendor/assets/stylesheets/bourbon/helpers/_gradient-positions-parser.scss +0 -24
  76. data/vendor/assets/stylesheets/bourbon/helpers/_linear-angle-parser.scss +0 -35
  77. data/vendor/assets/stylesheets/bourbon/helpers/_linear-gradient-parser.scss +0 -51
  78. data/vendor/assets/stylesheets/bourbon/helpers/_linear-positions-parser.scss +0 -77
  79. data/vendor/assets/stylesheets/bourbon/helpers/_linear-side-corner-parser.scss +0 -41
  80. data/vendor/assets/stylesheets/bourbon/helpers/_radial-arg-parser.scss +0 -74
  81. data/vendor/assets/stylesheets/bourbon/helpers/_radial-gradient-parser.scss +0 -55
  82. data/vendor/assets/stylesheets/bourbon/helpers/_radial-positions-parser.scss +0 -28
  83. data/vendor/assets/stylesheets/bourbon/helpers/_render-gradients.scss +0 -31
  84. data/vendor/assets/stylesheets/bourbon/helpers/_shape-size-stripper.scss +0 -15
  85. data/vendor/assets/stylesheets/bourbon/helpers/_str-to-num.scss +0 -55
  86. data/vendor/assets/stylesheets/bourbon/settings/_asset-pipeline.scss +0 -7
  87. data/vendor/assets/stylesheets/bourbon/settings/_deprecation-warnings.scss +0 -8
  88. data/vendor/assets/stylesheets/bourbon/settings/_prefixer.scss +0 -9
  89. data/vendor/assets/stylesheets/bourbon/settings/_px-to-em.scss +0 -1
@@ -1,31 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Checks if a list contains a value(s).
4
- ///
5
- /// @access private
6
- ///
7
- /// @param {List} $list
8
- /// The list to check against.
9
- ///
10
- /// @param {List} $values
11
- /// A single value or list of values to check for.
12
- ///
13
- /// @example scss - Usage
14
- /// contains($list, $value)
15
- ///
16
- /// @return {Bool}
17
-
18
- @function contains($list, $values...) {
19
- @if $output-bourbon-deprecation-warnings == true {
20
- @warn "[Bourbon] [Deprecation] `contains` is deprecated and will be " +
21
- "removed in 5.0.0.";
22
- }
23
-
24
- @each $value in $values {
25
- @if type-of(index($list, $value)) != "number" {
26
- @return false;
27
- }
28
- }
29
-
30
- @return true;
31
- }
@@ -1,16 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Checks for a valid CSS length.
4
- ///
5
- /// @param {String} $value
6
-
7
- @function is-length($value) {
8
- @if $output-bourbon-deprecation-warnings == true {
9
- @warn "[Bourbon] [Deprecation] `is-length` is deprecated and will be " +
10
- "removed in 5.0.0.";
11
- }
12
-
13
- @return type-of($value) != "null" and (str-slice($value + "", 1, 4) == "calc"
14
- or index(auto inherit initial 0, $value)
15
- or (type-of($value) == "number" and not(unitless($value))));
16
- }
@@ -1,26 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Programatically determines whether a color is light or dark.
4
- ///
5
- /// @link http://robots.thoughtbot.com/closer-look-color-lightness
6
- ///
7
- /// @param {Color (Hex)} $color
8
- ///
9
- /// @example scss - Usage
10
- /// is-light($color)
11
- ///
12
- /// @return {Bool}
13
-
14
- @function is-light($hex-color) {
15
- @if $output-bourbon-deprecation-warnings == true {
16
- @warn "[Bourbon] [Deprecation] `is-light` is deprecated and will be " +
17
- "removed in 5.0.0.";
18
- }
19
-
20
- $-local-red: red(rgba($hex-color, 1));
21
- $-local-green: green(rgba($hex-color, 1));
22
- $-local-blue: blue(rgba($hex-color, 1));
23
- $-local-lightness: ($-local-red * 0.2126 + $-local-green * 0.7152 + $-local-blue * 0.0722) / 255;
24
-
25
- @return $-local-lightness > 0.6;
26
- }
@@ -1,16 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Checks for a valid number.
4
- ///
5
- /// @param {Number} $value
6
- ///
7
- /// @require {function} contains
8
-
9
- @function is-number($value) {
10
- @if $output-bourbon-deprecation-warnings == true {
11
- @warn "[Bourbon] [Deprecation] `is-number` is deprecated and will be " +
12
- "removed in 5.0.0.";
13
- }
14
-
15
- @return contains("0" "1" "2" "3" "4" "5" "6" "7" "8" "9" 0 1 2 3 4 5 6 7 8 9, $value);
16
- }
@@ -1,23 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Checks for a valid CSS size.
4
- ///
5
- /// @param {String} $value
6
- ///
7
- /// @require {function} contains
8
- /// @require {function} is-length
9
-
10
- @function is-size($value) {
11
- @if $output-bourbon-deprecation-warnings == true {
12
- @warn "[Bourbon] [Deprecation] `is-size` is deprecated and will be " +
13
- "removed in 5.0.0.";
14
- }
15
-
16
- $user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
17
- $output-bourbon-deprecation-warnings: false !global;
18
-
19
- @return is-length($value)
20
- or contains("fill" "fit-content" "min-content" "max-content", $value);
21
-
22
- $output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
23
- }
@@ -1,74 +0,0 @@
1
- // Scaling Variables
2
- $golden: 1.618;
3
- $minor-second: 1.067;
4
- $major-second: 1.125;
5
- $minor-third: 1.2;
6
- $major-third: 1.25;
7
- $perfect-fourth: 1.333;
8
- $augmented-fourth: 1.414;
9
- $perfect-fifth: 1.5;
10
- $minor-sixth: 1.6;
11
- $major-sixth: 1.667;
12
- $minor-seventh: 1.778;
13
- $major-seventh: 1.875;
14
- $octave: 2;
15
- $major-tenth: 2.5;
16
- $major-eleventh: 2.667;
17
- $major-twelfth: 3;
18
- $double-octave: 4;
19
-
20
- $user-output-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
21
- $output-bourbon-deprecation-warnings: false;
22
-
23
- $modular-scale-ratio: $perfect-fourth !default;
24
- $modular-scale-base: em($em-base) !default;
25
-
26
- $output-bourbon-deprecation-warnings: $user-output-deprecation-warnings-setting;
27
-
28
- @function modular-scale($increment, $value: $modular-scale-base, $ratio: $modular-scale-ratio) {
29
- $v1: nth($value, 1);
30
- $v2: nth($value, length($value));
31
- $value: $v1;
32
-
33
- // scale $v2 to just above $v1
34
- @while $v2 > $v1 {
35
- $v2: ($v2 / $ratio); // will be off-by-1
36
- }
37
- @while $v2 < $v1 {
38
- $v2: ($v2 * $ratio); // will fix off-by-1
39
- }
40
-
41
- // check AFTER scaling $v2 to prevent double-counting corner-case
42
- $double-stranded: $v2 > $v1;
43
-
44
- @if $increment > 0 {
45
- @for $i from 1 through $increment {
46
- @if $double-stranded and ($v1 * $ratio) > $v2 {
47
- $value: $v2;
48
- $v2: ($v2 * $ratio);
49
- } @else {
50
- $v1: ($v1 * $ratio);
51
- $value: $v1;
52
- }
53
- }
54
- }
55
-
56
- @if $increment < 0 {
57
- // adjust $v2 to just below $v1
58
- @if $double-stranded {
59
- $v2: ($v2 / $ratio);
60
- }
61
-
62
- @for $i from $increment through -1 {
63
- @if $double-stranded and ($v1 / $ratio) < $v2 {
64
- $value: $v2;
65
- $v2: ($v2 / $ratio);
66
- } @else {
67
- $v1: ($v1 / $ratio);
68
- $value: $v1;
69
- }
70
- }
71
- }
72
-
73
- @return $value;
74
- }
@@ -1,24 +0,0 @@
1
- // Convert pixels to ems
2
- // eg. for a relational value of 12px write em(12) when the parent is 16px
3
- // if the parent is another value say 24px write em(12, 24)
4
-
5
- @function em($pxval, $base: $em-base) {
6
- @if $output-bourbon-deprecation-warnings == true {
7
- @warn "[Bourbon] [Deprecation] `em` is deprecated and will be " +
8
- "removed in 5.0.0.";
9
- }
10
-
11
- $user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
12
- $output-bourbon-deprecation-warnings: false !global;
13
-
14
- @if not unitless($pxval) {
15
- $pxval: strip-units($pxval);
16
- }
17
- @if not unitless($base) {
18
- $base: strip-units($base);
19
- }
20
-
21
- $output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
22
-
23
- @return ($pxval / $base) * 1em;
24
- }
@@ -1,26 +0,0 @@
1
- // Convert pixels to rems
2
- // eg. for a relational value of 12px write rem(12)
3
- // Assumes $em-base is the font-size of <html>
4
-
5
- @function rem($pxval) {
6
- @if $output-bourbon-deprecation-warnings == true {
7
- @warn "[Bourbon] [Deprecation] `rem` is deprecated and will be " +
8
- "removed in 5.0.0.";
9
- }
10
-
11
- $user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
12
- $output-bourbon-deprecation-warnings: false !global;
13
-
14
- @if not unitless($pxval) {
15
- $pxval: strip-units($pxval);
16
- }
17
-
18
- $base: $em-base;
19
- @if not unitless($base) {
20
- $base: strip-units($base);
21
- }
22
-
23
- $output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
24
-
25
- @return ($pxval / $base) * 1rem;
26
- }
@@ -1,24 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Mixes a color with black.
4
- ///
5
- /// @param {Color} $color
6
- ///
7
- /// @param {Number (Percentage)} $percent
8
- /// The amount of black to be mixed in.
9
- ///
10
- /// @example scss - Usage
11
- /// .element {
12
- /// background-color: shade(#ffbb52, 60%);
13
- /// }
14
- ///
15
- /// @example css - CSS Output
16
- /// .element {
17
- /// background-color: #664a20;
18
- /// }
19
- ///
20
- /// @return {Color}
21
-
22
- @function shade($color, $percent) {
23
- @return mix(#000, $color, $percent);
24
- }
@@ -1,22 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Strips the unit from a number.
4
- ///
5
- /// @param {Number (With Unit)} $value
6
- ///
7
- /// @example scss - Usage
8
- /// $dimension: strip-units(10em);
9
- ///
10
- /// @example css - CSS Output
11
- /// $dimension: 10;
12
- ///
13
- /// @return {Number (Unitless)}
14
-
15
- @function strip-units($value) {
16
- @if $output-bourbon-deprecation-warnings == true {
17
- @warn "[Bourbon] [Deprecation] `strip-units` is deprecated and will be " +
18
- "removed in 5.0.0 and replaced by the `strip-unit` function.";
19
- }
20
-
21
- @return ($value / ($value * 0 + 1));
22
- }
@@ -1,24 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Mixes a color with white.
4
- ///
5
- /// @param {Color} $color
6
- ///
7
- /// @param {Number (Percentage)} $percent
8
- /// The amount of white to be mixed in.
9
- ///
10
- /// @example scss - Usage
11
- /// .element {
12
- /// background-color: tint(#6ecaa6, 40%);
13
- /// }
14
- ///
15
- /// @example css - CSS Output
16
- /// .element {
17
- /// background-color: #a8dfc9;
18
- /// }
19
- ///
20
- /// @return {Color}
21
-
22
- @function tint($color, $percent) {
23
- @return mix(#fff, $color, $percent);
24
- }
@@ -1,37 +0,0 @@
1
- // Return vendor-prefixed property names if appropriate
2
- // Example: transition-property-names((transform, color, background), moz) -> -moz-transform, color, background
3
- //************************************************************************//
4
- @function transition-property-names($props, $vendor: false) {
5
- @if $output-bourbon-deprecation-warnings == true {
6
- @warn "[Bourbon] [Deprecation] `transition-property-names` is deprecated " +
7
- "and will be removed in 5.0.0.";
8
- }
9
-
10
- $user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
11
- $output-bourbon-deprecation-warnings: false !global;
12
-
13
- $new-props: ();
14
-
15
- @each $prop in $props {
16
- $new-props: append($new-props, transition-property-name($prop, $vendor), comma);
17
- }
18
-
19
- $output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
20
-
21
- @return $new-props;
22
- }
23
-
24
- @function transition-property-name($prop, $vendor: false) {
25
- @if $output-bourbon-deprecation-warnings == true {
26
- @warn "[Bourbon] [Deprecation] `transition-property-name` is deprecated " +
27
- "and will be removed in 5.0.0.";
28
- }
29
-
30
- // put other properties that need to be prefixed here aswell
31
- @if $vendor and $prop == transform {
32
- @return unquote('-'+$vendor+'-'+$prop);
33
- }
34
- @else {
35
- @return $prop;
36
- }
37
- }
@@ -1,32 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Converts shorthand to the 4-value syntax.
4
- ///
5
- /// @param {List} $shorthand
6
- ///
7
- /// @example scss - Usage
8
- /// .element {
9
- /// margin: unpack(1em 2em);
10
- /// }
11
- ///
12
- /// @example css - CSS Output
13
- /// .element {
14
- /// margin: 1em 2em 1em 2em;
15
- /// }
16
-
17
- @function unpack($shorthand) {
18
- @if $output-bourbon-deprecation-warnings == true {
19
- @warn "[Bourbon] [Deprecation] `unpack` is deprecated and will be " +
20
- "removed in 5.0.0.";
21
- }
22
-
23
- @if length($shorthand) == 1 {
24
- @return nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1);
25
- } @else if length($shorthand) == 2 {
26
- @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 1) nth($shorthand, 2);
27
- } @else if length($shorthand) == 3 {
28
- @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 3) nth($shorthand, 2);
29
- } @else {
30
- @return $shorthand;
31
- }
32
- }
@@ -1,26 +0,0 @@
1
- //************************************************************************//
2
- // Helper function for str-to-num fn.
3
- // Source: http://sassmeister.com/gist/9647408
4
- //************************************************************************//
5
- @function _convert-units($number, $unit) {
6
- @if $output-bourbon-deprecation-warnings == true {
7
- @warn "[Bourbon] [Deprecation] `_convert-units` is deprecated and will " +
8
- "be removed in 5.0.0.";
9
- }
10
-
11
- $strings: "px", "cm", "mm", "%", "ch", "pica", "in", "em", "rem", "pt", "pc", "ex", "vw", "vh", "vmin", "vmax", "deg", "rad", "grad", "turn";
12
- $units: 1px, 1cm, 1mm, 1%, 1ch, 1pica, 1in, 1em, 1rem, 1pt, 1pc, 1ex, 1vw, 1vh, 1vmin, 1vmax, 1deg, 1rad, 1grad, 1turn;
13
- $index: index($strings, $unit);
14
-
15
- @if not $index {
16
- @warn "Unknown unit `#{$unit}`.";
17
- @return false;
18
- }
19
-
20
- @if type-of($number) != "number" {
21
- @warn "`#{$number} is not a number`";
22
- @return false;
23
- }
24
-
25
- @return $number * nth($units, $index);
26
- }
@@ -1,108 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Directional-property mixins are shorthands for writing properties like the following
4
- ///
5
- /// @ignore You can also use `false` instead of `null`.
6
- ///
7
- /// @param {List} $vals
8
- /// List of directional values
9
- ///
10
- /// @example scss - Usage
11
- /// .element {
12
- /// @include border-style(dotted null);
13
- /// @include margin(null 0 10px);
14
- /// }
15
- ///
16
- /// @example css - CSS Output
17
- /// .element {
18
- /// border-bottom-style: dotted;
19
- /// border-top-style: dotted;
20
- /// margin-bottom: 10px;
21
- /// margin-left: 0;
22
- /// margin-right: 0;
23
- /// }
24
- ///
25
- /// @require {function} contains-falsy
26
- ///
27
- /// @return {List}
28
-
29
- @function collapse-directionals($vals) {
30
- @if $output-bourbon-deprecation-warnings == true {
31
- @warn "[Bourbon] [Deprecation] `collapse-directionals` is deprecated and " +
32
- "will be removed in 5.0.0.";
33
- }
34
-
35
- $output: null;
36
-
37
- $a: nth($vals, 1);
38
- $b: if(length($vals) < 2, $a, nth($vals, 2));
39
- $c: if(length($vals) < 3, $a, nth($vals, 3));
40
- $d: if(length($vals) < 2, $a, nth($vals, if(length($vals) < 4, 2, 4)));
41
-
42
- @if $a == 0 { $a: 0; }
43
- @if $b == 0 { $b: 0; }
44
- @if $c == 0 { $c: 0; }
45
- @if $d == 0 { $d: 0; }
46
-
47
- @if $a == $b and $a == $c and $a == $d { $output: $a; }
48
- @else if $a == $c and $b == $d { $output: $a $b; }
49
- @else if $b == $d { $output: $a $b $c; }
50
- @else { $output: $a $b $c $d; }
51
-
52
- @return $output;
53
- }
54
-
55
- /// Output directional properties, for instance `margin`.
56
- ///
57
- /// @access private
58
- ///
59
- /// @param {String} $pre
60
- /// Prefix to use
61
- /// @param {String} $suf
62
- /// Suffix to use
63
- /// @param {List} $vals
64
- /// List of values
65
- ///
66
- /// @require {function} collapse-directionals
67
- /// @require {function} contains-falsy
68
-
69
- @mixin directional-property($pre, $suf, $vals) {
70
- @include _bourbon-deprecate("directional-property");
71
-
72
- $user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
73
- $output-bourbon-deprecation-warnings: false !global;
74
-
75
- // Property Names
76
- $top: $pre + "-top" + if($suf, "-#{$suf}", "");
77
- $bottom: $pre + "-bottom" + if($suf, "-#{$suf}", "");
78
- $left: $pre + "-left" + if($suf, "-#{$suf}", "");
79
- $right: $pre + "-right" + if($suf, "-#{$suf}", "");
80
- $all: $pre + if($suf, "-#{$suf}", "");
81
-
82
- $vals: collapse-directionals($vals);
83
-
84
- @if contains-falsy($vals) {
85
- @if nth($vals, 1) { #{$top}: nth($vals, 1); }
86
-
87
- @if length($vals) == 1 {
88
- @if nth($vals, 1) { #{$right}: nth($vals, 1); }
89
- } @else {
90
- @if nth($vals, 2) { #{$right}: nth($vals, 2); }
91
- }
92
-
93
- @if length($vals) == 2 {
94
- @if nth($vals, 1) { #{$bottom}: nth($vals, 1); }
95
- @if nth($vals, 2) { #{$left}: nth($vals, 2); }
96
- } @else if length($vals) == 3 {
97
- @if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
98
- @if nth($vals, 2) { #{$left}: nth($vals, 2); }
99
- } @else if length($vals) == 4 {
100
- @if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
101
- @if nth($vals, 4) { #{$left}: nth($vals, 4); }
102
- }
103
- } @else {
104
- #{$all}: $vals;
105
- }
106
-
107
- $output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
108
- }