Skip to content

Commit a914ce3

Browse files
committed
#351: Add responsive styling for table columns.
1 parent 52f4cb5 commit a914ce3

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ <h2>Tables</h2>
104104
A simple table would look like this:
105105
</p>
106106
<table>
107+
<colgroup>
108+
<col style="width: 12em;"/>
109+
<col style="width: 6em;"/>
110+
<col style="width: 5em;"/>
111+
<col/>
112+
</colgroup>
107113
<thead>
108114
<tr>
109115
<th>Make</th>

scss/_tables.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ table {
99
table-layout: fixed;
1010
width: 100%;
1111

12+
col {
13+
@media all and (max-width: 1024px) {
14+
width: auto !important; // sass-lint:disable-line no-important
15+
}
16+
}
17+
1218
thead {
1319
th {
1420
border-bottom: .12 * $em solid $gray;

0 commit comments

Comments
 (0)