Skip to content

Commit

Permalink
Fix wrong use of thead and add caption styling
Browse files Browse the repository at this point in the history
The 'Data in a table' example table wrongly uses `thead` for a caption.
This moves that into a `caption` element.
And it adds some basic styling for it, as there wasn't any yet.
  • Loading branch information
selfthinker committed May 31, 2017
1 parent 013883f commit 704da1b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/views/snippets/data_table.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<table>
<thead>
<tr>
<th colspan="2">Dates and amounts</th>
</tr>
</thead>
<caption>Dates and amounts</caption>
<tbody>
<tr>
<td>First 6 weeks</td>
Expand All @@ -14,7 +10,7 @@
<td>£109.80 per week</td>
</tr>
<tr>
<td>Total estimated pay</td>
<td>Total estimated pay</td>
<td>£4,282.20</td>
</tr>
<tr>
Expand Down
5 changes: 5 additions & 0 deletions assets/sass/elements/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ table {
td.numeric {
font-family: $toolkit-font-stack-tabular;
}

caption {
text-align: left;
font-weight: 700;
}
}

.table-font-xsmall {
Expand Down

0 comments on commit 704da1b

Please sign in to comment.