Skip to content

Commit

Permalink
Fix grid examples (#469)
Browse files Browse the repository at this point in the history
* Begin creating relationships pattern

* Finish creating relationships component

* Added unit tests for relationships

* Change relationships to have configurable title and playback per option

* Update macro options and remove old code

* Fix grid examples
  • Loading branch information
bameyrick authored Jun 25, 2019
1 parent 10904c7 commit 136eb11
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
7 changes: 7 additions & 0 deletions src/scss/patternlib.scss
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,10 @@
max-width: 30rem;
}
}

.pl-grid-col {
margin: 0 0 1rem;
padding: 1rem;
background: #eee;
font-size: 0.8rem;
}
18 changes: 17 additions & 1 deletion src/styles/grid/_macro.njk
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
{% macro patternLibExampleGrid(params) %}
{% include "styles/grid/_template.njk" %}
{% if params.container -%}
<div class="container">
{% endif -%}

<div class="grid">
{% for item in (params.itemsList if params.itemsList is iterable else params.itemsList.items()) -%}
{% for i in range(0, item.repeat | default(1) ) -%}
<div class="grid__col col-{{ item.col }}@m {{ item.classes }}">
<div class="pl-grid-col">{{ item.col }} col</div>
</div>
{%- endfor %}
{%- endfor %}
</div>

{% if params.container -%}
</div>
{% endif -%}
{% endmacro %}
15 changes: 0 additions & 15 deletions src/styles/grid/_template.njk

This file was deleted.

0 comments on commit 136eb11

Please sign in to comment.