bourbonneat

Confusion about Neat 2.0 grid media


According to the official neat documentation, I should be about to use gird-media to change my layout based on a media query. But when I try to run the example code I get the following error:

@include grid-media($custom-neat-grid, $custom-neat-grid-2){
      ^
  Wrong number of arguments (2 for 1) for `grid-media'

I have a simple angular cli project with the following files:

styles.scss

@import "../bourbon/bourbon";
@import "../neat/neat";

$custom-neat-grid: (
    columns: 12,
    gutter: 50px,
    media: "screen and (max-width: 999px)",
);

$custom-neat-grid-2: (
    columns: 12,
    gutter: 70px,
    media: 1000px,
);

.element {
    @include grid-column(3);

    @include grid-media($custom-neat-grid, $custom-neat-grid-2){
        @include grid-column(6);
      }
}

app.component.html

<div class="container">
    <div class="row">
        <div class="element">
            <pre>test</pre>
        </div>
    </div>
</div>

I'm not sure what I'm doing wrong?


Solution

  • That feature is only available in v3.0

    In v2.0, grid-media only accepts 1 argument but in v3.0 it accepts one or multiple.