neat 1.7.0 → 4.0.0

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 (144) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +34 -0
  3. data/.github/ISSUE_TEMPLATE.md +22 -0
  4. data/.github/PULL_REQUEST_TEMPLATE.md +8 -0
  5. data/.gitignore +4 -2
  6. data/.hound.yml +5 -0
  7. data/.npmignore +20 -0
  8. data/.scss-lint.yml +239 -0
  9. data/.tool-versions +2 -0
  10. data/CHANGELOG.md +388 -0
  11. data/CODE_OF_CONDUCT.md +6 -0
  12. data/CONTRIBUTING.md +16 -1
  13. data/Gemfile +1 -2
  14. data/Gulpfile.js +42 -0
  15. data/{LICENSE → LICENSE.md} +8 -10
  16. data/README.md +138 -214
  17. data/RELEASING.md +27 -0
  18. data/Rakefile +3 -17
  19. data/bin/neat +2 -2
  20. data/contrib/base/_variables.scss +8 -0
  21. data/contrib/index.html +90 -0
  22. data/contrib/patterns/_box.scss +11 -0
  23. data/contrib/patterns/_global.scss +32 -0
  24. data/contrib/patterns/_grid-collapse.scss +3 -0
  25. data/contrib/patterns/_grid-media.scss +36 -0
  26. data/contrib/patterns/_grid-nested.scss +12 -0
  27. data/contrib/patterns/_grid-push.scss +7 -0
  28. data/contrib/patterns/_grid-shift.scss +7 -0
  29. data/contrib/patterns/_grid-visual.scss +3 -0
  30. data/contrib/patterns/_grid.scss +39 -0
  31. data/contrib/styles.scss +13 -0
  32. data/core/_neat.scss +26 -0
  33. data/core/neat/functions/_neat-append-grid-visual.scss +21 -0
  34. data/core/neat/functions/_neat-column-default.scss +23 -0
  35. data/core/neat/functions/_neat-column-ratio.scss +24 -0
  36. data/core/neat/functions/_neat-column-width.scss +25 -0
  37. data/core/neat/functions/_neat-float-direction.scss +22 -0
  38. data/core/neat/functions/_neat-merge-defaults.scss +23 -0
  39. data/core/neat/functions/_neat-opposite-direction.scss +22 -0
  40. data/core/neat/functions/_neat-parse-columns.scss +22 -0
  41. data/core/neat/functions/_neat-parse-media.scss +20 -0
  42. data/core/neat/functions/_retrieve-neat-settings.scss +19 -0
  43. data/core/neat/mixins/_grid-collapse.scss +35 -0
  44. data/core/neat/mixins/_grid-column.scss +39 -0
  45. data/core/neat/mixins/_grid-container.scss +31 -0
  46. data/core/neat/mixins/_grid-media.scss +88 -0
  47. data/core/neat/mixins/_grid-push.scss +37 -0
  48. data/core/neat/mixins/_grid-shift.scss +36 -0
  49. data/core/neat/mixins/_grid-visual.scss +41 -0
  50. data/core/neat/settings/_settings.scss +74 -0
  51. data/eyeglass-exports.js +7 -0
  52. data/index.js +7 -0
  53. data/lib/neat/generator.rb +43 -26
  54. data/lib/neat/version.rb +1 -1
  55. data/lib/neat.rb +6 -11
  56. data/neat.gemspec +26 -31
  57. data/package-lock.json +5960 -0
  58. data/package.json +47 -0
  59. data/spec/.keep +0 -0
  60. data/spec/fixtures/_setup.scss +1 -0
  61. data/spec/fixtures/functions/neat-column-default.scss +22 -0
  62. data/spec/fixtures/functions/neat-column-width.scss +30 -0
  63. data/spec/fixtures/functions/neat-float-direction.scss +17 -0
  64. data/spec/fixtures/functions/neat-opposite-direction.scss +17 -0
  65. data/spec/fixtures/functions/neat-parse-media.scss +9 -0
  66. data/spec/fixtures/functions/retrieve-neat-settings.scss +22 -0
  67. data/spec/fixtures/mixins/grid-collapse.scss +14 -0
  68. data/spec/fixtures/mixins/grid-column.scss +57 -0
  69. data/spec/fixtures/mixins/grid-container.scss +5 -0
  70. data/spec/fixtures/mixins/grid-media.scss +45 -0
  71. data/spec/fixtures/mixins/grid-push.scss +38 -0
  72. data/spec/fixtures/mixins/grid-shift.scss +38 -0
  73. data/spec/neat/functions/neat_column_default_spec.rb +35 -0
  74. data/spec/neat/functions/neat_column_width_spec.rb +47 -0
  75. data/spec/neat/functions/neat_float_direction_spec.rb +23 -0
  76. data/spec/neat/functions/neat_opposite_direction_spec.rb +23 -0
  77. data/spec/neat/functions/neat_parse_media_spec.rb +23 -0
  78. data/spec/neat/functions/retrieve_neat_settings_spec.rb +35 -0
  79. data/spec/neat/mixins/grid_collapse_spec.rb +26 -0
  80. data/spec/neat/mixins/grid_column_spec.rb +101 -0
  81. data/spec/neat/mixins/grid_container_spec.rb +17 -0
  82. data/spec/neat/mixins/grid_media_spec.rb +39 -0
  83. data/spec/neat/mixins/grid_push_spec.rb +59 -0
  84. data/spec/neat/mixins/grid_shift_spec.rb +59 -0
  85. data/spec/spec_helper.rb +5 -8
  86. data/spec/support/matchers/be_contained_in.rb +1 -1
  87. data/spec/support/matchers/have_rule.rb +8 -6
  88. data/spec/support/matchers/have_ruleset.rb +20 -0
  89. data/spec/support/matchers/have_value.rb +9 -7
  90. data/spec/support/parser_support.rb +8 -1
  91. data/spec/support/sass_support.rb +3 -3
  92. metadata +98 -148
  93. data/.rspec +0 -2
  94. data/.travis.yml +0 -5
  95. data/NEWS.md +0 -47
  96. data/app/assets/stylesheets/_neat-helpers.scss +0 -8
  97. data/app/assets/stylesheets/_neat.scss +0 -23
  98. data/app/assets/stylesheets/functions/_new-breakpoint.scss +0 -49
  99. data/app/assets/stylesheets/functions/_private.scss +0 -108
  100. data/app/assets/stylesheets/grid/_box-sizing.scss +0 -11
  101. data/app/assets/stylesheets/grid/_direction-context.scss +0 -31
  102. data/app/assets/stylesheets/grid/_display-context.scss +0 -26
  103. data/app/assets/stylesheets/grid/_fill-parent.scss +0 -22
  104. data/app/assets/stylesheets/grid/_media.scss +0 -92
  105. data/app/assets/stylesheets/grid/_omega.scss +0 -91
  106. data/app/assets/stylesheets/grid/_outer-container.scss +0 -36
  107. data/app/assets/stylesheets/grid/_pad.scss +0 -23
  108. data/app/assets/stylesheets/grid/_private.scss +0 -35
  109. data/app/assets/stylesheets/grid/_row.scss +0 -53
  110. data/app/assets/stylesheets/grid/_shift.scss +0 -48
  111. data/app/assets/stylesheets/grid/_span-columns.scss +0 -90
  112. data/app/assets/stylesheets/grid/_to-deprecate.scss +0 -105
  113. data/app/assets/stylesheets/grid/_visual-grid.scss +0 -40
  114. data/app/assets/stylesheets/settings/_disable-warnings.scss +0 -11
  115. data/app/assets/stylesheets/settings/_grid.scss +0 -53
  116. data/app/assets/stylesheets/settings/_visual-grid.scss +0 -25
  117. data/bower.json +0 -22
  118. data/lib/neat/engine.rb +0 -5
  119. data/lib/tasks/install.rake +0 -21
  120. data/sache.json +0 -5
  121. data/spec/neat/columns_spec.rb +0 -73
  122. data/spec/neat/container_spec.rb +0 -21
  123. data/spec/neat/default_spec.rb +0 -15
  124. data/spec/neat/direction_spec.rb +0 -19
  125. data/spec/neat/display_spec.rb +0 -19
  126. data/spec/neat/media_spec.rb +0 -55
  127. data/spec/neat/new_breakpoint_spec.rb +0 -17
  128. data/spec/neat/omega_spec.rb +0 -43
  129. data/spec/neat/pad_spec.rb +0 -32
  130. data/spec/neat/row_spec.rb +0 -39
  131. data/spec/neat/shift_spec.rb +0 -41
  132. data/spec/support/bourbon_support.rb +0 -9
  133. data/test/_setup.scss +0 -3
  134. data/test/default.scss +0 -1
  135. data/test/direction-context.scss +0 -13
  136. data/test/display-context.scss +0 -15
  137. data/test/media.scss +0 -39
  138. data/test/new-breakpoint.scss +0 -13
  139. data/test/omega.scss +0 -25
  140. data/test/outer-container.scss +0 -11
  141. data/test/pad.scss +0 -17
  142. data/test/row.scss +0 -26
  143. data/test/shift.scss +0 -36
  144. data/test/span-columns.scss +0 -21
@@ -1,92 +0,0 @@
1
- /// Outputs a media-query block with an optional grid context (the total number of columns used in the grid).
2
- ///
3
- /// @param {List} $query
4
- /// A list of media query features and values, where each `$feature` should have a corresponding `$value`.
5
- /// For a list of valid values for `$feature`, click [here](http://www.w3.org/TR/css3-mediaqueries/#media1).
6
- ///
7
- /// If there is only a single `$value` in `$query`, `$default-feature` is going to be used.
8
- ///
9
- /// The number of total columns in the grid can be set by passing `$columns` at the end of the list (overrides `$total-columns`).
10
- ///
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
- /// .responsive-element {
17
- /// @include media(769px) {
18
- /// @include span-columns(6);
19
- /// }
20
- /// }
21
- ///
22
- /// .new-context-element {
23
- /// @include media(min-width 320px max-width 480px, 6) {
24
- /// @include span-columns(6);
25
- /// }
26
- /// }
27
- ///
28
- /// @example css - CSS Output
29
- /// @media screen and (min-width: 769px) {
30
- /// .responsive-element {
31
- /// display: block;
32
- /// float: left;
33
- /// margin-right: 2.35765%;
34
- /// width: 48.82117%;
35
- /// }
36
- ///
37
- /// .responsive-element:last-child {
38
- /// margin-right: 0;
39
- /// }
40
- /// }
41
- ///
42
- /// @media screen and (min-width: 320px) and (max-width: 480px) {
43
- /// .new-context-element {
44
- /// display: block;
45
- /// float: left;
46
- /// margin-right: 4.82916%;
47
- /// width: 100%;
48
- /// }
49
- ///
50
- /// .new-context-element:last-child {
51
- /// margin-right: 0;
52
- /// }
53
- /// }
54
-
55
- @mixin media($query: $feature $value $columns, $total-columns: $grid-columns) {
56
- @if length($query) == 1 {
57
- @media screen and ($default-feature: nth($query, 1)) {
58
- $default-grid-columns: $grid-columns;
59
- $grid-columns: $total-columns !global;
60
- @content;
61
- $grid-columns: $default-grid-columns !global;
62
- }
63
- }
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 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
- }
@@ -1,91 +0,0 @@
1
- /// Removes the element's gutter margin, regardless of its position in the grid hierarchy or display property. It can target a specific element, or every `nth-child` occurrence. Works only with `block` layouts.
2
- ///
3
- /// @param {List} $query (block)
4
- /// List of arguments. Supported arguments are `nth-child` selectors (targets a specific pseudo element) and `auto` (targets `last-child`).
5
- ///
6
- /// When passed an `nth-child` argument of type `*n` with `block` display, the omega mixin automatically adds a clear to the `*n+1` th element. Note that composite arguments such as `2n+1` do not support this feature.
7
- ///
8
- /// **Deprecation warning**: The omega mixin will no longer take a `$direction` argument. To change the layout direction, use `row($direction)` or set `$default-layout-direction` instead.
9
- ///
10
- /// @example scss - Usage
11
- /// .element {
12
- /// @include omega;
13
- /// }
14
- ///
15
- /// .nth-element {
16
- /// @include omega(4n);
17
- /// }
18
- ///
19
- /// @example css - CSS Output
20
- /// .element {
21
- /// margin-right: 0;
22
- /// }
23
- ///
24
- /// .nth-element:nth-child(4n) {
25
- /// margin-right: 0;
26
- /// }
27
- ///
28
- /// .nth-element:nth-child(4n+1) {
29
- /// clear: left;
30
- /// }
31
-
32
- @mixin omega($query: block, $direction: default) {
33
- $table: belongs-to(table, $query);
34
- $auto: belongs-to(auto, $query);
35
-
36
- @if $direction != default {
37
- @include -neat-warn("The omega mixin will no longer take a $direction argument. To change the layout direction, use the direction(){...} mixin.");
38
- } @else {
39
- $direction: get-direction($layout-direction, $default-layout-direction);
40
- }
41
-
42
- @if $table {
43
- @include -neat-warn("The omega mixin no longer removes padding in table layouts.");
44
- }
45
-
46
- @if length($query) == 1 {
47
- @if $auto {
48
- &:last-child {
49
- margin-#{$direction}: 0;
50
- }
51
- }
52
-
53
- @else if contains-display-value($query) and $table == false {
54
- margin-#{$direction}: 0;
55
- }
56
-
57
- @else {
58
- @include nth-child($query, $direction);
59
- }
60
- }
61
-
62
- @else if length($query) == 2 {
63
- @if $auto {
64
- &:last-child {
65
- margin-#{$direction}: 0;
66
- }
67
- }
68
-
69
- @else {
70
- @include nth-child(nth($query, 1), $direction);
71
- }
72
- }
73
-
74
- @else {
75
- @include -neat-warn("Too many arguments passed to the omega() mixin.");
76
- }
77
- }
78
-
79
- @mixin nth-child($query, $direction) {
80
- $opposite-direction: get-opposite-direction($direction);
81
-
82
- &:nth-child(#{$query}) {
83
- margin-#{$direction}: 0;
84
- }
85
-
86
- @if type-of($query) == number {
87
- &:nth-child(#{$query}+1) {
88
- clear: $opposite-direction;
89
- }
90
- }
91
- }
@@ -1,36 +0,0 @@
1
- /// Makes an element a outer container by centring it in the viewport, clearing its floats, and setting its `max-width`.
2
- /// Although optional, using `outer-container` is recommended. The mixin can be called on more than one element per page, as long as they are not nested.
3
- ///
4
- /// @param {Number (unit)} $local-max-width ($max-width)
5
- /// Max width to be applied to the element. Can be a percentage or a measure.
6
- ///
7
- /// @example scss - Usage
8
- /// .element {
9
- /// @include outer-container(100%);
10
- /// }
11
- ///
12
- /// @example css - CSS Output
13
- /// .element {
14
- /// *zoom: 1;
15
- /// max-width: 100%;
16
- /// margin-left: auto;
17
- /// margin-right: auto;
18
- /// }
19
- ///
20
- /// .element:before, .element:after {
21
- /// content: " ";
22
- /// display: table;
23
- /// }
24
- ///
25
- /// .element:after {
26
- /// clear: both;
27
- /// }
28
-
29
- @mixin outer-container($local-max-width: $max-width) {
30
- @include clearfix;
31
- max-width: $local-max-width;
32
- margin: {
33
- left: auto;
34
- right: auto;
35
- }
36
- }
@@ -1,23 +0,0 @@
1
- /// Adds padding to the element.
2
- ///
3
- /// @param {List} $padding (flex-gutter())
4
- /// A list of padding value(s) to use. Passing `default` in the list will result in using the gutter width as a padding value.
5
- ///
6
- /// @example scss - Usage
7
- /// .element {
8
- /// @include pad(30px -20px 10px default);
9
- /// }
10
- ///
11
- /// @example css - CSS Output
12
- /// .element {
13
- /// padding: 30px -20px 10px 2.35765%;
14
- /// }
15
-
16
- @mixin pad($padding: flex-gutter()) {
17
- $padding-list: null;
18
- @each $value in $padding {
19
- $value: if($value == 'default', flex-gutter(), $value);
20
- $padding-list: join($padding-list, $value);
21
- }
22
- padding: $padding-list;
23
- }
@@ -1,35 +0,0 @@
1
- $parent-columns: $grid-columns !default;
2
- $fg-column: $column;
3
- $fg-gutter: $gutter;
4
- $fg-max-columns: $grid-columns;
5
- $container-display-table: false !default;
6
- $layout-direction: LTR !default;
7
-
8
- @function flex-grid($columns, $container-columns: $fg-max-columns) {
9
- $width: $columns * $fg-column + ($columns - 1) * $fg-gutter;
10
- $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter;
11
- @return percentage($width / $container-width);
12
- }
13
-
14
- @function flex-gutter($container-columns: $fg-max-columns, $gutter: $fg-gutter) {
15
- $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter;
16
- @return percentage($gutter / $container-width);
17
- }
18
-
19
- @function grid-width($n) {
20
- @return $n * $gw-column + ($n - 1) * $gw-gutter;
21
- }
22
-
23
- @function get-parent-columns($columns) {
24
- @if $columns != $grid-columns {
25
- $parent-columns: $columns !global;
26
- } @else {
27
- $parent-columns: $grid-columns !global;
28
- }
29
-
30
- @return $parent-columns;
31
- }
32
-
33
- @function is-display-table($container-is-display-table, $display) {
34
- @return $container-is-display-table == true or $display == table;
35
- }
@@ -1,53 +0,0 @@
1
- /// Designates the element as a row of columns in the grid layout. It clears the floats on the element and sets its display property. Rows can't be nested, but there can be more than one row element—with different display properties—per layout.
2
- ///
3
- /// @param {String} $display (default)
4
- /// Sets the display property of the element and the display context that will be used by its children. Can be `block` or `table`.
5
- ///
6
- /// @param {String} $direction ($default-layout-direction)
7
- /// Sets the layout direction. Can be `LTR` (left-to-right) or `RTL` (right-to-left).
8
- ///
9
- /// @example scss - Usage
10
- /// .element {
11
- /// @include row();
12
- /// }
13
- ///
14
- /// @example css - CSS Output
15
- /// .element {
16
- /// *zoom: 1;
17
- /// display: block;
18
- /// }
19
- ///
20
- /// .element:before, .element:after {
21
- /// content: " ";
22
- /// display: table;
23
- /// }
24
- ///
25
- /// .element:after {
26
- /// clear: both;
27
- /// }
28
-
29
- @mixin row($display: default, $direction: $default-layout-direction) {
30
- @if $direction != $default-layout-direction {
31
- @include -neat-warn("The $direction argument will be deprecated in future versions in favor of the direction(){...} mixin.");
32
- }
33
-
34
- $layout-direction: $direction !global;
35
-
36
- @if $display != default {
37
- @include -neat-warn("The $display argument will be deprecated in future versions in favor of the display(){...} mixin.");
38
- }
39
-
40
- @if $display == table {
41
- display: table;
42
- @include fill-parent;
43
- table-layout: fixed;
44
- $container-display-table: true !global;
45
- }
46
-
47
- @else {
48
- @include clearfix;
49
- display: block;
50
- $container-display-table: false !global;
51
- }
52
- }
53
-
@@ -1,48 +0,0 @@
1
- /// Translates an element horizontally by a number of columns. Positive arguments shift the element to the active layout direction, while negative ones shift it to the opposite direction.
2
- ///
3
- /// @param {Number (unitless)} $n-columns (1)
4
- /// Number of columns by which the element shifts.
5
- ///
6
- /// @example scss - Usage
7
- /// .element {
8
- /// @include shift(-3);
9
- /// }
10
- ///
11
- /// @example css - CSS output
12
- /// .element {
13
- /// margin-left: -25.58941%;
14
- /// }
15
-
16
- @mixin shift($n-columns: 1) {
17
- @include shift-in-context($n-columns);
18
- }
19
-
20
- /// Translates an element horizontally by a number of columns, in a specific nesting context.
21
- ///
22
- /// @param {List} $shift
23
- /// A list containing the number of columns to shift (`$columns`) and the number of columns of the parent element (`$container-columns`).
24
- ///
25
- /// The two values can be separated with any string such as `of`, `/`, etc.
26
- ///
27
- /// @example scss - Usage
28
- /// .element {
29
- /// @include shift(-3 of 6);
30
- /// }
31
- ///
32
- /// @example css - CSS output
33
- /// .element {
34
- /// margin-left: -52.41458%;
35
- /// }
36
-
37
- @mixin shift-in-context($shift: $columns of $container-columns) {
38
- $n-columns: nth($shift, 1);
39
- $parent-columns: container-shift($shift) !global;
40
-
41
- $direction: get-direction($layout-direction, $default-layout-direction);
42
- $opposite-direction: get-opposite-direction($direction);
43
-
44
- margin-#{$opposite-direction}: $n-columns * flex-grid(1, $parent-columns) + $n-columns * flex-gutter($parent-columns);
45
-
46
- // Reset nesting context
47
- $parent-columns: $grid-columns !global;
48
- }
@@ -1,90 +0,0 @@
1
- /// Specifies the number of columns an element should span. If the selector is nested the number of columns of its parent element should be passed as an argument as well.
2
- ///
3
- /// @param {List} $span
4
- /// A list containing `$columns`, the unitless number of columns the element spans (required), and `$container-columns`, the number of columns the parent element spans (optional).
5
- ///
6
- /// If only one value is passed, it is assumed that it's `$columns` and that that `$container-columns` is equal to `$grid-columns`, the total number of columns in the grid.
7
- ///
8
- /// The values can be separated with any string such as `of`, `/`, etc.
9
- ///
10
- /// @param {String} $display (block)
11
- /// Sets the display property of the element. By default it sets the display propert of the element to `block`.
12
- ///
13
- /// If passed `block-collapse`, it also removes the margin gutter by adding it to the element width.
14
- ///
15
- /// If passed `table`, it sets the display property to `table-cell` and calculates the width of the element without taking gutters into consideration. The result does not align with the block-based grid.
16
- ///
17
- /// @example scss - Usage
18
- /// .element {
19
- /// @include span-columns(6);
20
- ///
21
- /// .nested-element {
22
- /// @include span-columns(2 of 6);
23
- /// }
24
- /// }
25
- ///
26
- /// @example css - CSS Output
27
- /// .element {
28
- /// display: block;
29
- /// float: left;
30
- /// margin-right: 2.35765%;
31
- /// width: 48.82117%;
32
- /// }
33
- ///
34
- /// .element:last-child {
35
- /// margin-right: 0;
36
- /// }
37
- ///
38
- /// .element .nested-element {
39
- /// display: block;
40
- /// float: left;
41
- /// margin-right: 4.82916%;
42
- /// width: 30.11389%;
43
- /// }
44
- ///
45
- /// .element .nested-element:last-child {
46
- /// margin-right: 0;
47
- /// }
48
-
49
- @mixin span-columns($span: $columns of $container-columns, $display: block) {
50
- $columns: nth($span, 1);
51
- $container-columns: container-span($span);
52
-
53
- $parent-columns: get-parent-columns($container-columns) !global;
54
-
55
- $direction: get-direction($layout-direction, $default-layout-direction);
56
- $opposite-direction: get-opposite-direction($direction);
57
-
58
- $display-table: is-display-table($container-display-table, $display);
59
-
60
- @if $display-table {
61
- display: table-cell;
62
- width: percentage($columns / $container-columns);
63
- } @else {
64
- float: #{$opposite-direction};
65
-
66
- @if $display != no-display {
67
- display: block;
68
- }
69
-
70
- @if $display == collapse {
71
- @include -neat-warn("The 'collapse' argument will be deprecated. Use 'block-collapse' instead.");
72
- }
73
-
74
- @if $display == collapse or $display == block-collapse {
75
- width: flex-grid($columns, $container-columns) + flex-gutter($container-columns);
76
-
77
- &:last-child {
78
- width: flex-grid($columns, $container-columns);
79
- }
80
-
81
- } @else {
82
- margin-#{$direction}: flex-gutter($container-columns);
83
- width: flex-grid($columns, $container-columns);
84
-
85
- &:last-child {
86
- margin-#{$direction}: 0;
87
- }
88
- }
89
- }
90
- }
@@ -1,105 +0,0 @@
1
- @mixin breakpoint($query:$feature $value $columns, $total-columns: $grid-columns) {
2
- @include -neat-warn("The breakpoint() mixin was renamed to media() in Neat 1.0. Please update your project with the new syntax before the next version bump.");
3
-
4
- @if length($query) == 1 {
5
- @media screen and ($default-feature: nth($query, 1)) {
6
- $default-grid-columns: $grid-columns;
7
- $grid-columns: $total-columns;
8
- @content;
9
- $grid-columns: $default-grid-columns;
10
- }
11
- }
12
-
13
- @else if length($query) == 2 {
14
- @media screen and (nth($query, 1): nth($query, 2)) {
15
- $default-grid-columns: $grid-columns;
16
- $grid-columns: $total-columns;
17
- @content;
18
- $grid-columns: $default-grid-columns;
19
- }
20
- }
21
-
22
- @else if length($query) == 3 {
23
- @media screen and (nth($query, 1): nth($query, 2)) {
24
- $default-grid-columns: $grid-columns;
25
- $grid-columns: nth($query, 3);
26
- @content;
27
- $grid-columns: $default-grid-columns;
28
- }
29
- }
30
-
31
- @else if length($query) == 4 {
32
- @media screen and (nth($query, 1): nth($query, 2)) and (nth($query, 3): nth($query, 4)) {
33
- $default-grid-columns: $grid-columns;
34
- $grid-columns: $total-columns;
35
- @content;
36
- $grid-columns: $default-grid-columns;
37
- }
38
- }
39
-
40
- @else if length($query) == 5 {
41
- @media screen and (nth($query, 1): nth($query, 2)) and (nth($query, 3): nth($query, 4)) {
42
- $default-grid-columns: $grid-columns;
43
- $grid-columns: nth($query, 5);
44
- @content;
45
- $grid-columns: $default-grid-columns;
46
- }
47
- }
48
-
49
- @else {
50
- @include -neat-warn("Wrong number of arguments for breakpoint(). Read the documentation for more details.");
51
- }
52
- }
53
-
54
- @mixin nth-omega($nth, $display: block, $direction: default) {
55
- @include -neat-warn("The nth-omega() mixin is deprecated. Please use omega() instead.");
56
- @include omega($nth $display, $direction);
57
- }
58
-
59
- /// Resets the active display property to `block`. Particularly useful when changing the display property in a single row.
60
- ///
61
- /// @example scss - Usage
62
- /// .element {
63
- /// @include row(table);
64
- /// // Context changed to table display
65
- /// }
66
- ///
67
- /// @include reset-display;
68
- /// // Context is reset to block display
69
-
70
- @mixin reset-display {
71
- $container-display-table: false !global;
72
- @include -neat-warn("Resetting $display will be deprecated in future versions in favor of the display(){...} mixin.");
73
- }
74
-
75
- /// Resets the active layout direction to the default value set in `$default-layout-direction`. Particularly useful when changing the layout direction in a single row.
76
- ///
77
- /// @example scss - Usage
78
- /// .element {
79
- /// @include row($direction: RTL);
80
- /// // Context changed to right-to-left
81
- /// }
82
- ///
83
- /// @include reset-layout-direction;
84
- /// // Context is reset to left-to-right
85
-
86
- @mixin reset-layout-direction {
87
- $layout-direction: $default-layout-direction !global;
88
- @include -neat-warn("Resetting $direction will be deprecated in future versions in favor of the direction(){...} mixin.");
89
- }
90
-
91
- /// Resets both the active layout direction and the active display property.
92
- ///
93
- /// @example scss - Usage
94
- /// .element {
95
- /// @include row(table, RTL);
96
- /// // Context changed to table table and right-to-left
97
- /// }
98
- ///
99
- /// @include reset-all;
100
- /// // Context is reset to block display and left-to-right
101
-
102
- @mixin reset-all {
103
- @include reset-display;
104
- @include reset-layout-direction;
105
- }
@@ -1,40 +0,0 @@
1
- @mixin grid-column-gradient($values...) {
2
- background-image: -webkit-linear-gradient(left, $values);
3
- background-image: -moz-linear-gradient(left, $values);
4
- background-image: -ms-linear-gradient(left, $values);
5
- background-image: -o-linear-gradient(left, $values);
6
- background-image: unquote("linear-gradient(to left, #{$values})");
7
- }
8
-
9
- @if $visual-grid == true or $visual-grid == yes {
10
- body:before {
11
- content: '';
12
- display: inline-block;
13
- @include grid-column-gradient(gradient-stops($grid-columns));
14
- height: 100%;
15
- left: 0;
16
- margin: 0 auto;
17
- max-width: $max-width;
18
- opacity: $visual-grid-opacity;
19
- position: fixed;
20
- right: 0;
21
- width: 100%;
22
- pointer-events: none;
23
-
24
- @if $visual-grid-index == back {
25
- z-index: -1;
26
- }
27
-
28
- @else if $visual-grid-index == front {
29
- z-index: 9999;
30
- }
31
-
32
- @each $breakpoint in $visual-grid-breakpoints {
33
- @if $breakpoint {
34
- @include media($breakpoint) {
35
- @include grid-column-gradient(gradient-stops($grid-columns));
36
- }
37
- }
38
- }
39
- }
40
- }
@@ -1,11 +0,0 @@
1
- /// Disable all deprecation warnings. Defaults to `false`. Set with a `!global` flag.
2
- ///
3
- /// @type Bool
4
-
5
- $disable-warnings: false !default;
6
-
7
- @mixin -neat-warn($message) {
8
- @if $disable-warnings == false {
9
- @warn "#{$message}";
10
- }
11
- }
@@ -1,53 +0,0 @@
1
- /// Sets the relative width of a single grid column. The unit used should be the same one used to define `$gutter`. To learn more about golden-ratio() see [Bourbon docs](http://bourbon.io/docs/#golden-ratio). Set with a `!global` flag.
2
- ///
3
- /// @type Number (Unit)
4
-
5
- $column: golden-ratio(1em, 3) !default;
6
-
7
- /// Sets the relative width of a single grid gutter. The unit used should be the same one used to define `$column`. To learn more about golden-ratio() see [Bourbon docs](http://bourbon.io/docs/#golden-ratio). Set with the `!global` flag.
8
- ///
9
- /// @type Number (Unit)
10
-
11
- $gutter: golden-ratio(1em, 1) !default;
12
-
13
- /// Sets the total number of columns in the grid. Its value can be overridden inside a media query using the `media()` mixin. Set with the `!global` flag.
14
- ///
15
- /// @type Number (Unitless)
16
-
17
- $grid-columns: 12 !default;
18
-
19
- /// Sets the max-width property of the element that includes `outer-container()`. To learn more about `em()` see [Bourbon docs](http://bourbon.io/docs/#px-to-em). Set with the `!global` flag.
20
- ///
21
- /// @type Number (Unit)
22
- ///
23
- $max-width: em(1088) !default;
24
-
25
- /// When set to true, it sets the box-sizing property of all elements to `border-box`. Set with a `!global` flag.
26
- ///
27
- /// @type Bool
28
- ///
29
- /// @example css - CSS Output
30
- /// html {
31
- /// -webkit-box-sizing: border-box;
32
- /// -moz-box-sizing: border-box;
33
- /// box-sizing: border-box; }
34
- ///
35
- /// *, *:before, *:after {
36
- /// -webkit-box-sizing: inherit;
37
- /// -moz-box-sizing: inherit;
38
- /// box-sizing: inherit;
39
- /// }
40
-
41
- $border-box-sizing: true !default;
42
-
43
- /// Sets the default [media feature](http://www.w3.org/TR/css3-mediaqueries/#media) that `media()` and `new-breakpoint()` revert to when only a breakpoint value is passed. Set with a `!global` flag.
44
- ///
45
- /// @type String
46
-
47
- $default-feature: min-width; // Default @media feature for the breakpoint() mixin
48
-
49
- ///Sets the default layout direction of the grid. Can be `LTR` or `RTL`. Set with a `!global` flag.
50
- ///
51
- ///@type String
52
-
53
- $default-layout-direction: LTR !default;