fix(table of content): avoid breaks inside of list items

This commit is contained in:
Oscar 2020-01-15 16:13:23 +01:00
parent fdeeadc074
commit a0c65ee102
4 changed files with 15 additions and 11 deletions

View File

@ -1,4 +1,4 @@
<li>
<li class="toc__list-item">
{{ definition.data.title | linkIfExistsInCollection(collections.definedWords) | safe }}
{%- if
definition.data.flag and

View File

@ -4,7 +4,7 @@
{% for section in collections.tableOfContent %}
<li>
<span class="sub-headline">{{ section.title }}</span>
<ol>
<ol class="toc__list">
{% for definition in section.definitions %}
{% include 'components/table-of-content-item.njk' %}
{% endfor %}

View File

@ -181,6 +181,7 @@ th {
column-gap: var(--l-gap);
column-width: var(--auto-grid-min-size);
}
@import './structures/table-of-content';
.small-left-grid {
display: grid;

View File

@ -0,0 +1,3 @@
.toc__list-item {
page-break-inside: avoid;
}