You need to establish your grid. with-layout
is one way to do that for a small block of nested code, but why not just set them globally? There are several ways you could do it, all of them documented, but most likely you just want the layout()
mixin:
// note that it isn't nested under anything.
+layout(5 1/4 fluid show background)
Now you have a global context, and you can build your grid:
.grid
+container
.grid__item
+gallery(1)
That's it. If you really just want the grid set for a small section of code, you can use with-layout
. It works just like layout
, but it only affects the code nested inside it.
// with-layout() for a nested code block:
+with-layout(5 1/4 fluid show background)
.grid
+container
.grid__item
+gallery(1)