text-indent: var(--paragraph-indent);
text-align: var(--paragraph-align);
}
-main p.m-noindent {
+/* Remove indentation and justification where it doesn't make sense */
+main p.m-noindent, li p, table.m-table td p {
text-indent: 0;
text-align: left;
}
margin-bottom: 0;
}
+/* List items usually have just inline elements and are kept compact. If (sane)
+ block elements are inside list items, they have spacing even as last, but
+ not if the list item is the last. */
+li > p:last-child, li > blockquote:last-child, li > pre:last-child,
+li > figure.m-code-figure:last-child, li > figure.m-console-figure:last-child,
+li > .m-note:last-child, li > .m-frame:last-child, li > .m-block:last-child,
+li > .m-button:last-child, li > div.m-scroll:last-child,
+li > table.m-table:last-child, li > div.m-image:last-child,
+li > img.m-image:last-child, li > figure.m-figure:last-child,
+li > div.m-math:last-child {
+ margin-bottom: 1rem;
+}
+li > p:last-child, li:last-child > blockquote:last-child, li:last-child > pre:last-child,
+li:last-child > figure.m-code-figure:last-child, li:last-child > figure.m-console-figure:last-child,
+li:last-child > .m-note:last-child, li:last-child > .m-frame:last-child, li:last-child > .m-block:last-child,
+li:last-child > .m-button:last-child, li:last-child > div.m-scroll:last-child,
+li:last-child > table.m-table:last-child, li:last-child > div.m-image:last-child,
+li:last-child > img.m-image:last-child, li:last-child > figure.m-figure:last-child,
+li:last-child > div.m-math:last-child {
+ margin-bottom: 0;
+}
+
/* kate: indent-width 2; */
text-indent: 1.5rem;
text-align: justify;
}
-main p.m-noindent {
+main p.m-noindent, li p, table.m-table td p {
text-indent: 0;
text-align: left;
}
figure.m-figure:last-child, .m-imagegrid:last-child, div.m-math:last-child {
margin-bottom: 0;
}
+li > p:last-child, li > blockquote:last-child, li > pre:last-child,
+li > figure.m-code-figure:last-child, li > figure.m-console-figure:last-child,
+li > .m-note:last-child, li > .m-frame:last-child, li > .m-block:last-child,
+li > .m-button:last-child, li > div.m-scroll:last-child,
+li > table.m-table:last-child, li > div.m-image:last-child,
+li > img.m-image:last-child, li > figure.m-figure:last-child,
+li > div.m-math:last-child {
+ margin-bottom: 1rem;
+}
+li > p:last-child, li:last-child > blockquote:last-child, li:last-child > pre:last-child,
+li:last-child > figure.m-code-figure:last-child, li:last-child > figure.m-console-figure:last-child,
+li:last-child > .m-note:last-child, li:last-child > .m-frame:last-child, li:last-child > .m-block:last-child,
+li:last-child > .m-button:last-child, li:last-child > div.m-scroll:last-child,
+li:last-child > table.m-table:last-child, li:last-child > div.m-image:last-child,
+li:last-child > img.m-image:last-child, li:last-child > figure.m-figure:last-child,
+li:last-child > div.m-math:last-child {
+ margin-bottom: 0;
+}
.m-code .hll { background-color: #34424d }
.m-code .c { color: #a5c9ea }
text-indent: 1.5rem;
text-align: justify;
}
-main p.m-noindent {
+main p.m-noindent, li p, table.m-table td p {
text-indent: 0;
text-align: left;
}
figure.m-figure:last-child, .m-imagegrid:last-child, div.m-math:last-child {
margin-bottom: 0;
}
+li > p:last-child, li > blockquote:last-child, li > pre:last-child,
+li > figure.m-code-figure:last-child, li > figure.m-console-figure:last-child,
+li > .m-note:last-child, li > .m-frame:last-child, li > .m-block:last-child,
+li > .m-button:last-child, li > div.m-scroll:last-child,
+li > table.m-table:last-child, li > div.m-image:last-child,
+li > img.m-image:last-child, li > figure.m-figure:last-child,
+li > div.m-math:last-child {
+ margin-bottom: 1rem;
+}
+li > p:last-child, li:last-child > blockquote:last-child, li:last-child > pre:last-child,
+li:last-child > figure.m-code-figure:last-child, li:last-child > figure.m-console-figure:last-child,
+li:last-child > .m-note:last-child, li:last-child > .m-frame:last-child, li:last-child > .m-block:last-child,
+li:last-child > .m-button:last-child, li:last-child > div.m-scroll:last-child,
+li:last-child > table.m-table:last-child, li:last-child > div.m-image:last-child,
+li:last-child > img.m-image:last-child, li:last-child > figure.m-figure:last-child,
+li:last-child > div.m-math:last-child {
+ margin-bottom: 0;
+}
.m-console .hll { background-color: #ffffcc }
.m-console .g-AnsiBlack { color: #000000 }
.. role:: html(code)
:language: html
+.. contents::
+ :class: m-block m-default
+
Blocks
======
</tbody>
</table>
+Table with paragraphs
+---------------------
+
+.. raw:: html
+
+ <table class="m-table">
+ <tr>
+ <td>
+ <p>A paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ultrices a erat eu suscipit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ultrices a erat eu suscipit.</p>
+ <p>A second paragraph.</p>
+ </td>
+ <td>
+ <p>Another.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>Another. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ultrices a erat eu suscipit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ultrices a erat eu suscipit.</p>
+ </td>
+ <td>
+ <p>A paragraph.</p>
+ <p>A second paragraph.</p>
+ </td>
+ </tr>
+ </table>
+
Images
======
output</pre>
And a description of that illegal crackery that's done above.
</figure>
+
+List with components inside
+===========================
+
+.. raw:: html
+
+ <ul>
+ <li>
+ <p>A paragraph.</p>
+ <div class="m-note m-info">An info note.</div>
+ </li>
+ <li>
+ <a class="m-button m-primary">A button</a>
+ </li>
+ <li>
+ <p>Next item.</p>
+ <p>Next item next paragraph.</p>
+ </li>
+ </ul>
+
+ <p>Paragraph after.</p>
</tbody>
</table></div>
+Similarly to `lists <{filename}/css/typography.rst#lists-diaries>`_, if using
+:html:`<p>` elements inside :html:`<td>`, they are neither indented nor
+justified.
+
`Images`_
=========
Similarly to `typography elements <{filename}/css/typography.rst#padding>`_;
blocks, notes, frames, tables, images, figures, image grids, code and math
blocks and code figures have :css:`1rem` padding after, except when they are
-the last element, to avoid excessive spacing.
+the last element, to avoid excessive spacing. The list special casing applies
+here as well.
`Responsive utilities`_
=======================
Each :html:`<p>` element inside :html:`<main>` has the first line indented, is
justified and is separated from the following content by some padding. The
-:html:`<blockquote>` elements are, in addition, indented with a distinctive
-line on the left. Because the indentation may look distracting for manually
-wrapped line blocks, assign :css:`.m-poem` to such paragraph to indent all
-lines the same way. To remove the indentation and justification altogether, use
-:css:`.m-noindent`.
+:html:`<blockquote>` elements are indented with a distinctive line on the left.
+Because the indentation may look distracting for manually wrapped line blocks,
+assign :css:`.m-poem` to such paragraph to indent all lines the same way. To
+remove the indentation and justification altogether, use :css:`.m-noindent`.
.. code-figure::
aliquet nec consectetur in, mattis ac diam. Aliquam placerat justo ut purus
interdum, ac placerat lacus consequat.</p>
- <blockquote>Ut dictum enim posuere metus porta, et aliquam ex condimentum.
- Proin sagittis nisi leo, ac pellentesque purus bibendum sit amet.</blockquote>
+ <blockquote><p>Ut dictum enim posuere metus porta, et aliquam ex condimentum.
+ Proin sagittis nisi leo, ac pellentesque purus bibendum sit
+ amet.</p></blockquote>
<p class="m-poem">
Curabitur<br/>
aliquet nec consectetur in, mattis ac diam. Aliquam placerat justo ut purus
interdum, ac placerat lacus consequat.</p>
- <blockquote>Ut dictum enim posuere metus porta, et aliquam ex condimentum.
- Proin sagittis nisi leo, ac pellentesque purus bibendum sit amet.</blockquote>
+ <blockquote><p>Ut dictum enim posuere metus porta, et aliquam ex condimentum.
+ Proin sagittis nisi leo, ac pellentesque purus bibendum sit
+ amet.</p></blockquote>
<p class="m-poem">
Curabitur<br/>
<dd>Finally put my pants on. Too late.</dd>
</dl>
+The lists are compact by default, wrap item content in :html:`<p>` to make them
+inflated. Paragraphs in list items are neither indented nor justified.
+
+.. code-figure::
+
+ .. code:: html
+
+ <ul>
+ <li>
+ <p>Item 1, first paragraph.</p>
+ <p>Item 1, second paragraph.</p>
+ </li>
+ <li>
+ <p>Item 2</p>
+ <ol>
+ <li><p>An item</p></li>
+ <li><p>Another item</p></li>
+ </ol>
+ </li>
+ <li><p>Item 3</p></li>
+ </ul>
+
+ .. raw:: html
+
+ <ul>
+ <li>
+ <p>Item 1, first paragraph.</p>
+ <p>Item 1, second paragraph.</p>
+ </li>
+ <li>
+ <p>Item 2</p>
+ <ol>
+ <li><p>An item</p></li>
+ <li><p>Another item</p></li>
+ </ol>
+ </li>
+ <li><p>Item 3</p></li>
+ </ul>
+
`Headings`_
===========
Block elements :html:`<p>`, :html:`<ol>`, :html:`<ul>`, :html:`<dl>`,
:html:`<blockqote>`, :html:`<pre>` and :html:`<hr>` by default have :css:`1rem`
padding after, except when they are the last child, to avoid excessive spacing.
+A special case is lists --- components directly inside :html:`<li>` elements
+have :css:`1rem` padding after, except when the :html:`<li>` is last, to
+achieve consistent spacing for inflated lists.