dta_rapid 0.2.5 → 0.2.6

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 (126) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/forms/text-input.html +2 -0
  3. data/_sass/_colors.scss +18 -3
  4. data/_sass/components/text-input.scss +71 -0
  5. data/_sass/vendor/bourbon/_bourbon-deprecate.scss +19 -0
  6. data/_sass/vendor/bourbon/_bourbon-deprecated-upcoming.scss +425 -0
  7. data/_sass/vendor/bourbon/_bourbon.scss +90 -0
  8. data/_sass/vendor/bourbon/addons/_border-color.scss +29 -0
  9. data/_sass/vendor/bourbon/addons/_border-radius.scss +48 -0
  10. data/_sass/vendor/bourbon/addons/_border-style.scss +28 -0
  11. data/_sass/vendor/bourbon/addons/_border-width.scss +28 -0
  12. data/_sass/vendor/bourbon/addons/_buttons.scss +69 -0
  13. data/_sass/vendor/bourbon/addons/_clearfix.scss +25 -0
  14. data/_sass/vendor/bourbon/addons/_ellipsis.scss +30 -0
  15. data/_sass/vendor/bourbon/addons/_font-stacks.scss +31 -0
  16. data/_sass/vendor/bourbon/addons/_hide-text.scss +27 -0
  17. data/_sass/vendor/bourbon/addons/_margin.scss +29 -0
  18. data/_sass/vendor/bourbon/addons/_padding.scss +29 -0
  19. data/_sass/vendor/bourbon/addons/_position.scss +51 -0
  20. data/_sass/vendor/bourbon/addons/_prefixer.scss +66 -0
  21. data/_sass/vendor/bourbon/addons/_retina-image.scss +27 -0
  22. data/_sass/vendor/bourbon/addons/_size.scss +51 -0
  23. data/_sass/vendor/bourbon/addons/_text-inputs.scss +118 -0
  24. data/_sass/vendor/bourbon/addons/_timing-functions.scss +34 -0
  25. data/_sass/vendor/bourbon/addons/_triangle.scss +63 -0
  26. data/_sass/vendor/bourbon/addons/_word-wrap.scss +29 -0
  27. data/_sass/vendor/bourbon/css3/_animation.scss +61 -0
  28. data/_sass/vendor/bourbon/css3/_appearance.scss +5 -0
  29. data/_sass/vendor/bourbon/css3/_backface-visibility.scss +5 -0
  30. data/_sass/vendor/bourbon/css3/_background-image.scss +44 -0
  31. data/_sass/vendor/bourbon/css3/_background.scss +57 -0
  32. data/_sass/vendor/bourbon/css3/_border-image.scss +61 -0
  33. data/_sass/vendor/bourbon/css3/_calc.scss +6 -0
  34. data/_sass/vendor/bourbon/css3/_columns.scss +67 -0
  35. data/_sass/vendor/bourbon/css3/_filter.scss +6 -0
  36. data/_sass/vendor/bourbon/css3/_flex-box.scss +327 -0
  37. data/_sass/vendor/bourbon/css3/_font-face.scss +29 -0
  38. data/_sass/vendor/bourbon/css3/_font-feature-settings.scss +6 -0
  39. data/_sass/vendor/bourbon/css3/_hidpi-media-query.scss +12 -0
  40. data/_sass/vendor/bourbon/css3/_hyphens.scss +6 -0
  41. data/_sass/vendor/bourbon/css3/_image-rendering.scss +15 -0
  42. data/_sass/vendor/bourbon/css3/_keyframes.scss +38 -0
  43. data/_sass/vendor/bourbon/css3/_linear-gradient.scss +40 -0
  44. data/_sass/vendor/bourbon/css3/_perspective.scss +12 -0
  45. data/_sass/vendor/bourbon/css3/_placeholder.scss +10 -0
  46. data/_sass/vendor/bourbon/css3/_radial-gradient.scss +40 -0
  47. data/_sass/vendor/bourbon/css3/_selection.scss +44 -0
  48. data/_sass/vendor/bourbon/css3/_text-decoration.scss +27 -0
  49. data/_sass/vendor/bourbon/css3/_transform.scss +21 -0
  50. data/_sass/vendor/bourbon/css3/_transition.scss +81 -0
  51. data/_sass/vendor/bourbon/css3/_user-select.scss +5 -0
  52. data/_sass/vendor/bourbon/functions/_assign-inputs.scss +16 -0
  53. data/_sass/vendor/bourbon/functions/_contains-falsy.scss +25 -0
  54. data/_sass/vendor/bourbon/functions/_contains.scss +31 -0
  55. data/_sass/vendor/bourbon/functions/_is-length.scss +16 -0
  56. data/_sass/vendor/bourbon/functions/_is-light.scss +26 -0
  57. data/_sass/vendor/bourbon/functions/_is-number.scss +16 -0
  58. data/_sass/vendor/bourbon/functions/_is-size.scss +18 -0
  59. data/_sass/vendor/bourbon/functions/_modular-scale.scss +74 -0
  60. data/_sass/vendor/bourbon/functions/_px-to-em.scss +24 -0
  61. data/_sass/vendor/bourbon/functions/_px-to-rem.scss +26 -0
  62. data/_sass/vendor/bourbon/functions/_shade.scss +24 -0
  63. data/_sass/vendor/bourbon/functions/_strip-units.scss +22 -0
  64. data/_sass/vendor/bourbon/functions/_tint.scss +24 -0
  65. data/_sass/vendor/bourbon/functions/_transition-property-name.scss +37 -0
  66. data/_sass/vendor/bourbon/functions/_unpack.scss +32 -0
  67. data/_sass/vendor/bourbon/helpers/_convert-units.scss +26 -0
  68. data/_sass/vendor/bourbon/helpers/_directional-values.scss +108 -0
  69. data/_sass/vendor/bourbon/helpers/_font-source-declaration.scss +53 -0
  70. data/_sass/vendor/bourbon/helpers/_gradient-positions-parser.scss +24 -0
  71. data/_sass/vendor/bourbon/helpers/_linear-angle-parser.scss +35 -0
  72. data/_sass/vendor/bourbon/helpers/_linear-gradient-parser.scss +51 -0
  73. data/_sass/vendor/bourbon/helpers/_linear-positions-parser.scss +77 -0
  74. data/_sass/vendor/bourbon/helpers/_linear-side-corner-parser.scss +41 -0
  75. data/_sass/vendor/bourbon/helpers/_radial-arg-parser.scss +74 -0
  76. data/_sass/vendor/bourbon/helpers/_radial-gradient-parser.scss +55 -0
  77. data/_sass/vendor/bourbon/helpers/_radial-positions-parser.scss +28 -0
  78. data/_sass/vendor/bourbon/helpers/_render-gradients.scss +31 -0
  79. data/_sass/vendor/bourbon/helpers/_shape-size-stripper.scss +15 -0
  80. data/_sass/vendor/bourbon/helpers/_str-to-num.scss +55 -0
  81. data/_sass/vendor/bourbon/settings/_asset-pipeline.scss +7 -0
  82. data/_sass/vendor/bourbon/settings/_deprecation-warnings.scss +8 -0
  83. data/_sass/vendor/bourbon/settings/_prefixer.scss +9 -0
  84. data/_sass/vendor/bourbon/settings/_px-to-em.scss +1 -0
  85. data/_sass/vendor/neat/_neat-helpers.scss +8 -0
  86. data/_sass/vendor/neat/_neat.scss +19 -22
  87. data/_sass/vendor/neat/functions/_new-breakpoint.scss +49 -0
  88. data/_sass/vendor/neat/functions/_private.scss +114 -0
  89. data/_sass/vendor/neat/grid/_box-sizing.scss +15 -0
  90. data/_sass/vendor/neat/grid/_direction-context.scss +33 -0
  91. data/_sass/vendor/neat/grid/_display-context.scss +28 -0
  92. data/_sass/vendor/neat/grid/_fill-parent.scss +22 -0
  93. data/_sass/vendor/neat/grid/_media.scss +92 -0
  94. data/_sass/vendor/neat/grid/_omega.scss +87 -0
  95. data/_sass/vendor/neat/grid/_outer-container.scss +38 -0
  96. data/_sass/vendor/neat/grid/_pad.scss +25 -0
  97. data/_sass/vendor/neat/grid/_private.scss +35 -0
  98. data/_sass/vendor/neat/grid/_row.scss +52 -0
  99. data/_sass/vendor/neat/grid/_shift.scss +50 -0
  100. data/_sass/vendor/neat/grid/_span-columns.scss +94 -0
  101. data/_sass/vendor/neat/grid/_to-deprecate.scss +97 -0
  102. data/_sass/vendor/neat/grid/_visual-grid.scss +42 -0
  103. data/_sass/vendor/neat/settings/_disable-warnings.scss +13 -0
  104. data/_sass/vendor/neat/settings/_grid.scss +51 -0
  105. data/_sass/vendor/neat/settings/_visual-grid.scss +27 -0
  106. data/assets/style.scss +7 -4
  107. metadata +103 -20
  108. data/_sass/components/.keep +0 -0
  109. data/_sass/vendor/neat/neat/functions/_neat-append-grid-visual.scss +0 -21
  110. data/_sass/vendor/neat/neat/functions/_neat-column-default.scss +0 -23
  111. data/_sass/vendor/neat/neat/functions/_neat-column-ratio.scss +0 -24
  112. data/_sass/vendor/neat/neat/functions/_neat-column-width.scss +0 -25
  113. data/_sass/vendor/neat/neat/functions/_neat-float-direction.scss +0 -22
  114. data/_sass/vendor/neat/neat/functions/_neat-merge-defaults.scss +0 -23
  115. data/_sass/vendor/neat/neat/functions/_neat-opposite-direction.scss +0 -22
  116. data/_sass/vendor/neat/neat/functions/_neat-parse-columns.scss +0 -22
  117. data/_sass/vendor/neat/neat/functions/_neat-parse-media.scss +0 -20
  118. data/_sass/vendor/neat/neat/functions/_retrieve-neat-settings.scss +0 -19
  119. data/_sass/vendor/neat/neat/mixins/_grid-collapse.scss +0 -36
  120. data/_sass/vendor/neat/neat/mixins/_grid-column.scss +0 -39
  121. data/_sass/vendor/neat/neat/mixins/_grid-container.scss +0 -30
  122. data/_sass/vendor/neat/neat/mixins/_grid-media.scss +0 -67
  123. data/_sass/vendor/neat/neat/mixins/_grid-push.scss +0 -37
  124. data/_sass/vendor/neat/neat/mixins/_grid-shift.scss +0 -36
  125. data/_sass/vendor/neat/neat/mixins/_grid-visual.scss +0 -67
  126. data/_sass/vendor/neat/neat/settings/_settings.scss +0 -74
@@ -0,0 +1,31 @@
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
+ }
@@ -0,0 +1,16 @@
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
+ }
@@ -0,0 +1,26 @@
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
+ }
@@ -0,0 +1,16 @@
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
+ }
@@ -0,0 +1,18 @@
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
+ @return is-length($value)
17
+ or contains("fill" "fit-content" "min-content" "max-content", $value);
18
+ }
@@ -0,0 +1,74 @@
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
+ }
@@ -0,0 +1,24 @@
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
+ }
@@ -0,0 +1,26 @@
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
+ }
@@ -0,0 +1,24 @@
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
+ }
@@ -0,0 +1,22 @@
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. Use the renamed `strip-unit` function instead.";
19
+ }
20
+
21
+ @return ($value / ($value * 0 + 1));
22
+ }
@@ -0,0 +1,24 @@
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
+ }
@@ -0,0 +1,37 @@
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
+ }
@@ -0,0 +1,32 @@
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
+ }
@@ -0,0 +1,26 @@
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
+ }
@@ -0,0 +1,108 @@
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
+ }