div.m-scroll > table.m-table:last-child {
margin-bottom: 0.0625rem;
}
-table.m-table tbody tr:hover {
+table.m-table:not(.m-flat) tbody tr:hover {
background-color: var(--line-color);
}
table.m-table th, table.m-table td {
.. raw:: html
- <table class="m-table m-center-t">
- <caption>Table caption</caption>
- <thead>
- <tr>
- <th>#</th>
- <th>Heading</th>
- <th>Second<br/>heading</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <th scope="row">1</th>
- <td>Cell</td>
- <td>Second cell</td>
- </tr>
- </tbody>
- <tbody>
- <tr>
- <th scope="row">2</th>
- <td>2nd row cell</td>
- <td>2nd row 2nd cell</td>
- </tr>
- </tbody>
- <tfoot>
- <tr>
- <th>Σ</th>
- <td>Footer</td>
- <td>Second<br/>footer</td>
- </tr>
- </tfoot>
+ <table class="m-table m-flat">
+ <caption>Flat table (w/o hover effect)</caption>
+ <tr>
+ <th scope="row">1</th>
+ <td>Cell</td>
+ <td>Second cell</td>
+ </tr>
+ <tr>
+ <th scope="row">2</th>
+ <td>2nd row cell</td>
+ <td>2nd row 2nd cell</td>
+ </tr>
</table>
<div class="m-scroll"><table class="m-table m-fullwidth">
<caption>Full-width table</caption>
Use :css:`.m-table` to apply styling to a table. The table is centered by
default; rows are separated by lines, with :html:`<thead>` and :html:`<tfoot>`
-being separated by a thicker line. Rows are highlighted on hover, :html:`<th>`
-is rendered in bold, all :html:`<th>` and :html:`<td>` are aligned to left
-while table :html:`<caption>` is centered. Example table:
+being separated by a thicker line. The :html:`<th>` element is rendered in
+bold, all :html:`<th>` and :html:`<td>` are aligned to left while table
+:html:`<caption>` is centered. Example table:
.. code-figure::
<td>Cell</td>
<td>Second cell</td>
</tr>
- </tbody>
- <tbody>
<tr>
<th scope="row">2</th>
<td>2nd row cell</td>
</tfoot>
</table>
-Similarly to other components, you can color particular :html:`<tr>` or
-:html:`<td>` elements using the color classes from above:
+Rows are highlighted on hover, if you want to disable that, put :css:`.m-flat`
+CSS class on the :html:`<table>` element. Similarly to other components, you
+can color particular :html:`<tr>` or :html:`<td>` elements using the color
+classes from above:
.. raw:: html