Browse Source

fix single celled tfoot

In the case of a single celled tfoot the `:last-child` overrides the `:first-child` and leaves the table with a sharp bottom-left corner. An good example of this use case would be if you had a button action at the end of the table, similar to the first table example in the docs.

```
<table class="ui table segment">
  <thead>
    <tr><th>Name</th>
    <th>Status</th>
    <th>Notes</th>
  </tr></thead>
  <tbody>
    <tr>
      <td>John</td>
      <td>Approved</td>
      <td>None</td>
    </tr>
    <tr>
      <td>Jamie</td>
      <td>Approved</td>
      <td>Requires call</td>
    </tr>
    <tr>
      <td>Jill</td>
      <td>Denied</td>
      <td>None</td>
    </tr>
  </tbody>
  <tfoot>
    <tr><th colspan="3">
      <div class="ui blue labeled icon button"><i class="user icon"></i> Add User</div>
    </th>
  </tr></tfoot>
</table>
  <tfoot>
    <tr><th></th></tr>
  </tfoot>
</table>
```

There's probably a better way to do this, but it worked for me in my project.
pull/696/head
Michael Mullins 11 years ago
parent
commit
43232d02fe
1 changed files with 4 additions and 1 deletions
  1. 5
      src/collections/table.less

5
src/collections/table.less

@ -66,6 +66,9 @@
.ui.table tfoot th:last-child {
border-radius: 0px 0px 5px 0px;
}
.ui.table tfoot th:first-child:last-child {
border-radius: 0px 0px 5px 5px;
}
/* Table Cells */
.ui.table td {
@ -577,4 +580,4 @@
/* Large */
.ui.large.table {
font-size: 1.1em;
}
}
Loading…
Cancel
Save