uswds-jekyll 2.2.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -23
  3. data/_includes/components/footer--medium.html +100 -0
  4. data/_includes/components/header--basic.html +12 -10
  5. data/_includes/components/header--extended.html +16 -12
  6. data/_includes/footer.html +2 -1
  7. data/_includes/header.html +4 -0
  8. data/_includes/scripts.html +12 -3
  9. data/_sass/uswds/components/_header.scss +1 -1
  10. data/_sass/uswds/components/_sidenav.scss +0 -23
  11. data/_sass/uswds/core/_utilities.scss +3 -3
  12. data/_sass/uswds/core/_variables.scss +15 -16
  13. data/_sass/uswds/elements/_inputs.scss +1 -3
  14. data/assets/uswds/css/uswds.css +7 -38
  15. data/assets/uswds/css/uswds.min.css +2 -2
  16. data/assets/uswds/css/uswds.min.css.map +1 -1
  17. metadata +5 -140
  18. data/_includes/components/footer.html +0 -82
  19. data/_includes/last-modified.html +0 -3
  20. data/_layouts/search-results.html +0 -25
  21. data/assets/uswds/scss/_all.scss +0 -1
  22. data/assets/uswds/scss/components/_accordions.scss +0 -150
  23. data/assets/uswds/scss/components/_alerts.scss +0 -125
  24. data/assets/uswds/scss/components/_banner.scss +0 -204
  25. data/assets/uswds/scss/components/_footer.scss +0 -518
  26. data/assets/uswds/scss/components/_forms.scss +0 -164
  27. data/assets/uswds/scss/components/_graphic-list.scss +0 -35
  28. data/assets/uswds/scss/components/_header.scss +0 -218
  29. data/assets/uswds/scss/components/_hero.scss +0 -37
  30. data/assets/uswds/scss/components/_layout.scss +0 -36
  31. data/assets/uswds/scss/components/_media-block.scss +0 -12
  32. data/assets/uswds/scss/components/_navigation.scss +0 -549
  33. data/assets/uswds/scss/components/_search.scss +0 -111
  34. data/assets/uswds/scss/components/_section.scss +0 -37
  35. data/assets/uswds/scss/components/_sidenav.scss +0 -31
  36. data/assets/uswds/scss/components/_skipnav.scss +0 -19
  37. data/assets/uswds/scss/core/_base.scss +0 -35
  38. data/assets/uswds/scss/core/_defaults.scss +0 -8
  39. data/assets/uswds/scss/core/_fonts.scss +0 -65
  40. data/assets/uswds/scss/core/_grid-settings.scss +0 -3
  41. data/assets/uswds/scss/core/_grid.scss +0 -199
  42. data/assets/uswds/scss/core/_utilities.scss +0 -252
  43. data/assets/uswds/scss/core/_variables.scss +0 -156
  44. data/assets/uswds/scss/elements/_buttons.scss +0 -217
  45. data/assets/uswds/scss/elements/_embed.scss +0 -26
  46. data/assets/uswds/scss/elements/_figure.scss +0 -13
  47. data/assets/uswds/scss/elements/_inputs.scss +0 -353
  48. data/assets/uswds/scss/elements/_labels.scss +0 -20
  49. data/assets/uswds/scss/elements/_list.scss +0 -32
  50. data/assets/uswds/scss/elements/_table.scss +0 -55
  51. data/assets/uswds/scss/elements/_typography.scss +0 -260
  52. data/assets/uswds/scss/lib/_bourbon-deprecated-upcoming.scss +0 -411
  53. data/assets/uswds/scss/lib/_bourbon.scss +0 -87
  54. data/assets/uswds/scss/lib/_neat-helpers.scss +0 -11
  55. data/assets/uswds/scss/lib/_neat.scss +0 -23
  56. data/assets/uswds/scss/lib/_normalize.scss +0 -424
  57. data/assets/uswds/scss/lib/addons/_border-color.scss +0 -26
  58. data/assets/uswds/scss/lib/addons/_border-radius.scss +0 -48
  59. data/assets/uswds/scss/lib/addons/_border-style.scss +0 -25
  60. data/assets/uswds/scss/lib/addons/_border-width.scss +0 -25
  61. data/assets/uswds/scss/lib/addons/_buttons.scss +0 -64
  62. data/assets/uswds/scss/lib/addons/_clearfix.scss +0 -25
  63. data/assets/uswds/scss/lib/addons/_ellipsis.scss +0 -30
  64. data/assets/uswds/scss/lib/addons/_font-stacks.scss +0 -31
  65. data/assets/uswds/scss/lib/addons/_hide-text.scss +0 -27
  66. data/assets/uswds/scss/lib/addons/_margin.scss +0 -26
  67. data/assets/uswds/scss/lib/addons/_padding.scss +0 -26
  68. data/assets/uswds/scss/lib/addons/_position.scss +0 -48
  69. data/assets/uswds/scss/lib/addons/_prefixer.scss +0 -66
  70. data/assets/uswds/scss/lib/addons/_retina-image.scss +0 -25
  71. data/assets/uswds/scss/lib/addons/_size.scss +0 -51
  72. data/assets/uswds/scss/lib/addons/_text-inputs.scss +0 -113
  73. data/assets/uswds/scss/lib/addons/_timing-functions.scss +0 -34
  74. data/assets/uswds/scss/lib/addons/_triangle.scss +0 -63
  75. data/assets/uswds/scss/lib/addons/_word-wrap.scss +0 -29
  76. data/assets/uswds/scss/lib/css3/_animation.scss +0 -43
  77. data/assets/uswds/scss/lib/css3/_appearance.scss +0 -3
  78. data/assets/uswds/scss/lib/css3/_backface-visibility.scss +0 -3
  79. data/assets/uswds/scss/lib/css3/_background-image.scss +0 -42
  80. data/assets/uswds/scss/lib/css3/_background.scss +0 -55
  81. data/assets/uswds/scss/lib/css3/_border-image.scss +0 -59
  82. data/assets/uswds/scss/lib/css3/_calc.scss +0 -4
  83. data/assets/uswds/scss/lib/css3/_columns.scss +0 -47
  84. data/assets/uswds/scss/lib/css3/_filter.scss +0 -4
  85. data/assets/uswds/scss/lib/css3/_flex-box.scss +0 -287
  86. data/assets/uswds/scss/lib/css3/_font-face.scss +0 -24
  87. data/assets/uswds/scss/lib/css3/_font-feature-settings.scss +0 -4
  88. data/assets/uswds/scss/lib/css3/_hidpi-media-query.scss +0 -10
  89. data/assets/uswds/scss/lib/css3/_hyphens.scss +0 -4
  90. data/assets/uswds/scss/lib/css3/_image-rendering.scss +0 -14
  91. data/assets/uswds/scss/lib/css3/_keyframes.scss +0 -36
  92. data/assets/uswds/scss/lib/css3/_linear-gradient.scss +0 -38
  93. data/assets/uswds/scss/lib/css3/_perspective.scss +0 -8
  94. data/assets/uswds/scss/lib/css3/_placeholder.scss +0 -8
  95. data/assets/uswds/scss/lib/css3/_radial-gradient.scss +0 -39
  96. data/assets/uswds/scss/lib/css3/_selection.scss +0 -42
  97. data/assets/uswds/scss/lib/css3/_text-decoration.scss +0 -19
  98. data/assets/uswds/scss/lib/css3/_transform.scss +0 -15
  99. data/assets/uswds/scss/lib/css3/_transition.scss +0 -71
  100. data/assets/uswds/scss/lib/css3/_user-select.scss +0 -3
  101. data/assets/uswds/scss/lib/functions/_assign-inputs.scss +0 -11
  102. data/assets/uswds/scss/lib/functions/_contains-falsy.scss +0 -20
  103. data/assets/uswds/scss/lib/functions/_contains.scss +0 -26
  104. data/assets/uswds/scss/lib/functions/_is-length.scss +0 -11
  105. data/assets/uswds/scss/lib/functions/_is-light.scss +0 -21
  106. data/assets/uswds/scss/lib/functions/_is-number.scss +0 -11
  107. data/assets/uswds/scss/lib/functions/_is-size.scss +0 -13
  108. data/assets/uswds/scss/lib/functions/_modular-scale.scss +0 -69
  109. data/assets/uswds/scss/lib/functions/_new-breakpoint.scss +0 -49
  110. data/assets/uswds/scss/lib/functions/_private.scss +0 -114
  111. data/assets/uswds/scss/lib/functions/_px-to-em.scss +0 -13
  112. data/assets/uswds/scss/lib/functions/_px-to-rem.scss +0 -15
  113. data/assets/uswds/scss/lib/functions/_shade.scss +0 -24
  114. data/assets/uswds/scss/lib/functions/_strip-units.scss +0 -17
  115. data/assets/uswds/scss/lib/functions/_tint.scss +0 -24
  116. data/assets/uswds/scss/lib/functions/_transition-property-name.scss +0 -22
  117. data/assets/uswds/scss/lib/functions/_unpack.scss +0 -27
  118. data/assets/uswds/scss/lib/grid/_box-sizing.scss +0 -15
  119. data/assets/uswds/scss/lib/grid/_direction-context.scss +0 -33
  120. data/assets/uswds/scss/lib/grid/_display-context.scss +0 -28
  121. data/assets/uswds/scss/lib/grid/_fill-parent.scss +0 -22
  122. data/assets/uswds/scss/lib/grid/_media.scss +0 -92
  123. data/assets/uswds/scss/lib/grid/_omega.scss +0 -87
  124. data/assets/uswds/scss/lib/grid/_outer-container.scss +0 -34
  125. data/assets/uswds/scss/lib/grid/_pad.scss +0 -25
  126. data/assets/uswds/scss/lib/grid/_private.scss +0 -35
  127. data/assets/uswds/scss/lib/grid/_row.scss +0 -52
  128. data/assets/uswds/scss/lib/grid/_shift.scss +0 -50
  129. data/assets/uswds/scss/lib/grid/_span-columns.scss +0 -94
  130. data/assets/uswds/scss/lib/grid/_to-deprecate.scss +0 -97
  131. data/assets/uswds/scss/lib/grid/_visual-grid.scss +0 -42
  132. data/assets/uswds/scss/lib/helpers/_convert-units.scss +0 -21
  133. data/assets/uswds/scss/lib/helpers/_directional-values.scss +0 -96
  134. data/assets/uswds/scss/lib/helpers/_font-source-declaration.scss +0 -43
  135. data/assets/uswds/scss/lib/helpers/_gradient-positions-parser.scss +0 -13
  136. data/assets/uswds/scss/lib/helpers/_linear-angle-parser.scss +0 -25
  137. data/assets/uswds/scss/lib/helpers/_linear-gradient-parser.scss +0 -41
  138. data/assets/uswds/scss/lib/helpers/_linear-positions-parser.scss +0 -61
  139. data/assets/uswds/scss/lib/helpers/_linear-side-corner-parser.scss +0 -31
  140. data/assets/uswds/scss/lib/helpers/_radial-arg-parser.scss +0 -69
  141. data/assets/uswds/scss/lib/helpers/_radial-gradient-parser.scss +0 -50
  142. data/assets/uswds/scss/lib/helpers/_radial-positions-parser.scss +0 -18
  143. data/assets/uswds/scss/lib/helpers/_render-gradients.scss +0 -26
  144. data/assets/uswds/scss/lib/helpers/_shape-size-stripper.scss +0 -10
  145. data/assets/uswds/scss/lib/helpers/_str-to-num.scss +0 -50
  146. data/assets/uswds/scss/lib/mixins/_clearfix.scss +0 -25
  147. data/assets/uswds/scss/lib/settings/_asset-pipeline.scss +0 -7
  148. data/assets/uswds/scss/lib/settings/_disable-warnings.scss +0 -13
  149. data/assets/uswds/scss/lib/settings/_grid.scss +0 -51
  150. data/assets/uswds/scss/lib/settings/_prefixer.scss +0 -9
  151. data/assets/uswds/scss/lib/settings/_px-to-em.scss +0 -1
  152. data/assets/uswds/scss/lib/settings/_visual-grid.scss +0 -27
  153. data/assets/uswds/scss/uswds.scss +0 -41
@@ -1,49 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Returns a media context (media query / grid context) that can be stored in a variable and passed to `media()` as a single-keyword argument. Media contexts defined using `new-breakpoint` are used by the visual grid, as long as they are defined before importing Neat.
4
- ///
5
- /// @param {List} $query
6
- /// A list of media query features and values. Each `$feature` should have a corresponding `$value`.
7
- ///
8
- /// If there is only a single `$value` in `$query`, `$default-feature` is going to be used.
9
- ///
10
- /// The number of total columns in the grid can be set by passing `$columns` at the end of the list (overrides `$total-columns`). For a list of valid values for `$feature`, click [here](http://www.w3.org/TR/css3-mediaqueries/#media1).
11
- ///
12
- /// @param {Number (unitless)} $total-columns [$grid-columns]
13
- /// - Number of columns to use in the new grid context. Can be set as a shorthand in the first parameter.
14
- ///
15
- /// @example scss - Usage
16
- /// $mobile: new-breakpoint(max-width 480px 4);
17
- ///
18
- /// .element {
19
- /// @include media($mobile) {
20
- /// @include span-columns(4);
21
- /// }
22
- /// }
23
- ///
24
- /// @example css - CSS Output
25
- /// @media screen and (max-width: 480px) {
26
- /// .element {
27
- /// display: block;
28
- /// float: left;
29
- /// margin-right: 7.42297%;
30
- /// width: 100%;
31
- /// }
32
- /// .element:last-child {
33
- /// margin-right: 0;
34
- /// }
35
- /// }
36
-
37
- @function new-breakpoint($query: $feature $value $columns, $total-columns: $grid-columns) {
38
- @if length($query) == 1 {
39
- $query: $default-feature nth($query, 1) $total-columns;
40
- } @else if is-even(length($query)) {
41
- $query: append($query, $total-columns);
42
- }
43
-
44
- @if is-not(belongs-to($query, $visual-grid-breakpoints)) {
45
- $visual-grid-breakpoints: append($visual-grid-breakpoints, $query, comma) !global;
46
- }
47
-
48
- @return $query;
49
- }
@@ -1,114 +0,0 @@
1
- // Not function for Libsass compatibility
2
- // https://github.com/sass/libsass/issues/368
3
- @function is-not($value) {
4
- @return if($value, false, true);
5
- }
6
-
7
- // Checks if a number is even
8
- @function is-even($int) {
9
- @return $int % 2 == 0;
10
- }
11
-
12
- // Checks if an element belongs to a list or not
13
- @function belongs-to($tested-item, $list) {
14
- @return is-not(not-belongs-to($tested-item, $list));
15
- }
16
-
17
- @function not-belongs-to($tested-item, $list) {
18
- @return is-not(index($list, $tested-item));
19
- }
20
-
21
- // Contains display value
22
- @function contains-display-value($query) {
23
- @return belongs-to(table, $query)
24
- or belongs-to(block, $query)
25
- or belongs-to(inline-block, $query)
26
- or belongs-to(inline, $query);
27
- }
28
-
29
- // Parses the first argument of span-columns()
30
- @function container-span($span: $span) {
31
- @if length($span) == 3 {
32
- $container-columns: nth($span, 3);
33
- @return $container-columns;
34
- } @else if length($span) == 2 {
35
- $container-columns: nth($span, 2);
36
- @return $container-columns;
37
- }
38
-
39
- @return $grid-columns;
40
- }
41
-
42
- @function container-shift($shift: $shift) {
43
- $parent-columns: $grid-columns !default !global;
44
-
45
- @if length($shift) == 3 {
46
- $container-columns: nth($shift, 3);
47
- @return $container-columns;
48
- } @else if length($shift) == 2 {
49
- $container-columns: nth($shift, 2);
50
- @return $container-columns;
51
- }
52
-
53
- @return $parent-columns;
54
- }
55
-
56
- // Generates a striped background
57
- @function gradient-stops($grid-columns, $color: $visual-grid-color) {
58
- $transparent: transparent;
59
-
60
- $column-width: flex-grid(1, $grid-columns);
61
- $gutter-width: flex-gutter($grid-columns);
62
- $column-offset: $column-width;
63
-
64
- $values: ($transparent 0, $color 0);
65
-
66
- @for $i from 1 to $grid-columns*2 {
67
- @if is-even($i) {
68
- $values: append($values, $transparent $column-offset, comma);
69
- $values: append($values, $color $column-offset, comma);
70
- $column-offset: $column-offset + $column-width;
71
- } @else {
72
- $values: append($values, $color $column-offset, comma);
73
- $values: append($values, $transparent $column-offset, comma);
74
- $column-offset: $column-offset + $gutter-width;
75
- }
76
- }
77
-
78
- @return $values;
79
- }
80
-
81
- // Layout direction
82
- @function get-direction($layout, $default) {
83
- $direction: null;
84
-
85
- @if to-upper-case($layout) == "LTR" or to-upper-case($layout) == "RTL" {
86
- $direction: direction-from-layout($layout);
87
- } @else {
88
- $direction: direction-from-layout($default);
89
- }
90
-
91
- @return $direction;
92
- }
93
-
94
- @function direction-from-layout($layout) {
95
- $direction: null;
96
-
97
- @if to-upper-case($layout) == "LTR" {
98
- $direction: right;
99
- } @else {
100
- $direction: left;
101
- }
102
-
103
- @return $direction;
104
- }
105
-
106
- @function get-opposite-direction($direction) {
107
- $opposite-direction: left;
108
-
109
- @if $direction == "left" {
110
- $opposite-direction: right;
111
- }
112
-
113
- @return $opposite-direction;
114
- }
@@ -1,13 +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 not unitless($pxval) {
7
- $pxval: strip-units($pxval);
8
- }
9
- @if not unitless($base) {
10
- $base: strip-units($base);
11
- }
12
- @return ($pxval / $base) * 1em;
13
- }
@@ -1,15 +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 not unitless($pxval) {
7
- $pxval: strip-units($pxval);
8
- }
9
-
10
- $base: $em-base;
11
- @if not unitless($base) {
12
- $base: strip-units($base);
13
- }
14
- @return ($pxval / $base) * 1rem;
15
- }
@@ -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,17 +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
- @return ($value / ($value * 0 + 1));
17
- }
@@ -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,22 +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
- $new-props: ();
6
-
7
- @each $prop in $props {
8
- $new-props: append($new-props, transition-property-name($prop, $vendor), comma);
9
- }
10
-
11
- @return $new-props;
12
- }
13
-
14
- @function transition-property-name($prop, $vendor: false) {
15
- // put other properties that need to be prefixed here aswell
16
- @if $vendor and $prop == transform {
17
- @return unquote('-'+$vendor+'-'+$prop);
18
- }
19
- @else {
20
- @return $prop;
21
- }
22
- }
@@ -1,27 +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 length($shorthand) == 1 {
19
- @return nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1);
20
- } @else if length($shorthand) == 2 {
21
- @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 1) nth($shorthand, 2);
22
- } @else if length($shorthand) == 3 {
23
- @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 3) nth($shorthand, 2);
24
- } @else {
25
- @return $shorthand;
26
- }
27
- }
@@ -1,15 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- @if $border-box-sizing == true {
4
- html { // http://bit.ly/1qk2tVR
5
- box-sizing: border-box;
6
- }
7
-
8
- * {
9
- &,
10
- &::after,
11
- &::before {
12
- box-sizing: inherit;
13
- }
14
- }
15
- }
@@ -1,33 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Changes the direction property used by other mixins called in the code block argument.
4
- ///
5
- /// @param {String} $direction [left-to-right]
6
- /// Layout direction to be used within the block. Can be `left-to-right` or `right-to-left`.
7
- ///
8
- /// @example scss - Usage
9
- /// @include direction-context(right-to-left) {
10
- /// .right-to-left-block {
11
- /// @include span-columns(6);
12
- /// }
13
- /// }
14
- ///
15
- /// @example css - CSS Output
16
- /// .right-to-left-block {
17
- /// float: right;
18
- /// ...
19
- /// }
20
-
21
- @mixin direction-context($direction: left-to-right) {
22
- $scope-direction: $layout-direction;
23
-
24
- @if to-lower-case($direction) == "left-to-right" {
25
- $layout-direction: LTR !global;
26
- } @else if to-lower-case($direction) == "right-to-left" {
27
- $layout-direction: RTL !global;
28
- }
29
-
30
- @content;
31
-
32
- $layout-direction: $scope-direction !global;
33
- }
@@ -1,28 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Changes the display property used by other mixins called in the code block argument.
4
- ///
5
- /// @param {String} $display [block]
6
- /// Display value to be used within the block. Can be `table` or `block`.
7
- ///
8
- /// @example scss
9
- /// @include display-context(table) {
10
- /// .display-table {
11
- /// @include span-columns(6);
12
- /// }
13
- /// }
14
- ///
15
- /// @example css
16
- /// .display-table {
17
- /// display: table-cell;
18
- /// ...
19
- /// }
20
-
21
- @mixin display-context($display: block) {
22
- $scope-display: $container-display-table;
23
- $container-display-table: $display == table !global;
24
-
25
- @content;
26
-
27
- $container-display-table: $scope-display !global;
28
- }
@@ -1,22 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Forces the element to fill its parent container.
4
- ///
5
- /// @example scss - Usage
6
- /// .element {
7
- /// @include fill-parent;
8
- /// }
9
- ///
10
- /// @example css - CSS Output
11
- /// .element {
12
- /// width: 100%;
13
- /// box-sizing: border-box;
14
- /// }
15
-
16
- @mixin fill-parent() {
17
- width: 100%;
18
-
19
- @if $border-box-sizing == false {
20
- box-sizing: border-box;
21
- }
22
- }
@@ -1,92 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /// Outputs a media-query block with an optional grid context (the total number of columns used in the grid).
4
- ///
5
- /// @param {List} $query
6
- /// A list of media query features and values, where each `$feature` should have a corresponding `$value`.
7
- /// For a list of valid values for `$feature`, click [here](http://www.w3.org/TR/css3-mediaqueries/#media1).
8
- ///
9
- /// If there is only a single `$value` in `$query`, `$default-feature` is going to be used.
10
- ///
11
- /// The number of total columns in the grid can be set by passing `$columns` at the end of the list (overrides `$total-columns`).
12
- ///
13
- ///
14
- /// @param {Number (unitless)} $total-columns [$grid-columns]
15
- /// - Number of columns to use in the new grid context. Can be set as a shorthand in the first parameter.
16
- ///
17
- /// @example scss - Usage
18
- /// .responsive-element {
19
- /// @include media(769px) {
20
- /// @include span-columns(6);
21
- /// }
22
- /// }
23
- ///
24
- /// .new-context-element {
25
- /// @include media(min-width 320px max-width 480px, 6) {
26
- /// @include span-columns(6);
27
- /// }
28
- /// }
29
- ///
30
- /// @example css - CSS Output
31
- /// @media screen and (min-width: 769px) {
32
- /// .responsive-element {
33
- /// display: block;
34
- /// float: left;
35
- /// margin-right: 2.35765%;
36
- /// width: 48.82117%;
37
- /// }
38
- ///
39
- /// .responsive-element:last-child {
40
- /// margin-right: 0;
41
- /// }
42
- /// }
43
- ///
44
- /// @media screen and (min-width: 320px) and (max-width: 480px) {
45
- /// .new-context-element {
46
- /// display: block;
47
- /// float: left;
48
- /// margin-right: 4.82916%;
49
- /// width: 100%;
50
- /// }
51
- ///
52
- /// .new-context-element:last-child {
53
- /// margin-right: 0;
54
- /// }
55
- /// }
56
-
57
- @mixin media($query: $feature $value $columns, $total-columns: $grid-columns) {
58
- @if length($query) == 1 {
59
- @media screen and ($default-feature: nth($query, 1)) {
60
- $default-grid-columns: $grid-columns;
61
- $grid-columns: $total-columns !global;
62
- @content;
63
- $grid-columns: $default-grid-columns !global;
64
- }
65
- } @else {
66
- $loop-to: length($query);
67
- $media-query: "screen and ";
68
- $default-grid-columns: $grid-columns;
69
- $grid-columns: $total-columns !global;
70
-
71
- @if is-not(is-even(length($query))) {
72
- $grid-columns: nth($query, $loop-to) !global;
73
- $loop-to: $loop-to - 1;
74
- }
75
-
76
- $i: 1;
77
- @while $i <= $loop-to {
78
- $media-query: $media-query + "(" + nth($query, $i) + ": " + nth($query, $i + 1) + ") ";
79
-
80
- @if ($i + 1) != $loop-to {
81
- $media-query: $media-query + "and ";
82
- }
83
-
84
- $i: $i + 2;
85
- }
86
-
87
- @media #{$media-query} {
88
- @content;
89
- $grid-columns: $default-grid-columns !global;
90
- }
91
- }
92
- }