Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
fix(Stencila): Fix vertical spacing for nested lists after paragraphs
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ketch committed Oct 10, 2019
1 parent 93971a3 commit 2ef401a
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
61 changes: 61 additions & 0 deletions src/examples/simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ <h6>Title 6</h6>
</figure>
</stencila-code-chunk>

<h2>Lists</h2>

<ul>
<li>Item number 1</li>
<li>Item number 2</li>
Expand All @@ -56,6 +58,65 @@ <h6>Title 6</h6>
<li>Item number 8</li>
</ul>

<p>
Stencila recognises lists in Google Docs including unordered (bulleted)
lists like this:
</p>
<ul>
<li>
<p>Apple</p>
</li>
<li>
<p>Pear</p>
</li>
<li>
<p>Peach</p>
</li>
</ul>
<p>And ordered lists like this:</p>
<ol>
<li>
<p>Butter</p>
</li>
<li>
<p>Cheese</p>
</li>
<li>
<p>Milk</p>
</li>
</ol>
<p>Nested lists are supported too:</p>
<ol>
<li>
<p>Fruit</p>
<ol>
<li>
<p>Apple</p>
</li>
<li>
<p>Pear</p>
</li>
<li>
<p>Peach</p>
</li>
</ol>
</li>
<li>
<p>Dairy</p>
<ol>
<li>
<p>Butter</p>
</li>
<li>
<p>Cheese</p>
</li>
<li>
<p>Milk</p>
</li>
</ol>
</li>
</ol>

<stencila-code-chunk data-collapsed="false" data-execution_count="4">
<pre slot="text"><code class="lang-python">import time
time.sleep(10)</code></pre>
Expand Down
5 changes: 5 additions & 0 deletions src/themes/stencila/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ li {
margin-top: 0;
}

p + ul,
p + ol {
margin-top: -1.25rem;
}

> *:last-child:not(figure) {
margin-bottom: 0;
}
Expand Down

0 comments on commit 2ef401a

Please sign in to comment.