Merge pull request #98 from picocss/fix/table

Tables: Remove explicit background-color and add tfoot support
This commit is contained in:
Lucas Larroche 2021-12-31 17:03:33 +07:00 committed by GitHub
commit ab75fca7d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 97 additions and 44 deletions

View file

@ -168,11 +168,13 @@ h5 {
}
thead th,
thead td {
thead td,
tfoot th,
tfoot td {
--border-width: 3px;
}
:not(thead) > * > td {
:not(thead):not(tfoot) > * > td {
--font-size: 0.875em;
}
@ -1663,12 +1665,14 @@ td {
text-align: start;
}
tr {
background-color: var(--background-color);
tfoot th,
tfoot td {
border-top: var(--border-width) solid var(--table-border-color);
border-bottom: 0;
}
table[role=grid] tbody tr:nth-child(odd) {
--background-color: var(--table-row-stripped-background-color);
background-color: var(--table-row-stripped-background-color);
}
/**

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -173,11 +173,13 @@ h5 {
}
thead th,
thead td {
thead td,
tfoot th,
tfoot td {
--border-width: 3px;
}
:not(thead) > * > td {
:not(thead):not(tfoot) > * > td {
--font-size: 0.875em;
}
@ -1850,12 +1852,14 @@ td {
text-align: start;
}
tr {
background-color: var(--background-color);
tfoot th,
tfoot td {
border-top: var(--border-width) solid var(--table-border-color);
border-bottom: 0;
}
table[role=grid] tbody tr:nth-child(odd) {
--background-color: var(--table-row-stripped-background-color);
background-color: var(--table-row-stripped-background-color);
}
/**

File diff suppressed because one or more lines are too long

View file

@ -168,11 +168,13 @@ h5 {
}
thead th,
thead td {
thead td,
tfoot th,
tfoot td {
--border-width: 3px;
}
:not(thead) > * > td {
:not(thead):not(tfoot) > * > td {
--font-size: 0.875em;
}
@ -1633,12 +1635,14 @@ td {
text-align: start;
}
tr {
background-color: var(--background-color);
tfoot th,
tfoot td {
border-top: var(--border-width) solid var(--table-border-color);
border-bottom: 0;
}
table[role=grid] tbody tr:nth-child(odd) {
--background-color: var(--table-row-stripped-background-color);
background-color: var(--table-row-stripped-background-color);
}
/**

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
css/pico.min.css vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -105,11 +105,13 @@ h5 {
}
thead th,
thead td {
thead td,
tfoot th,
tfoot td {
--border-width: 3px;
}
:not(thead) > * > td {
:not(thead):not(tfoot) > * > td {
--font-size: 0.875em;
}
@ -1393,12 +1395,14 @@ td {
text-align: start;
}
tr {
background-color: var(--background-color);
tfoot th,
tfoot td {
border-top: var(--border-width) solid var(--table-border-color);
border-bottom: 0;
}
table[role=grid] tbody tr:nth-child(odd) {
--background-color: var(--table-row-stripped-background-color);
background-color: var(--table-row-stripped-background-color);
}
/**

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -169,11 +169,13 @@ h5 {
}
thead th,
thead td {
thead td,
tfoot th,
tfoot td {
--border-width: 3px;
}
:not(thead) > * > td {
:not(thead):not(tfoot) > * > td {
--font-size: 0.875em;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -58,6 +58,16 @@
<td>Cell</td>
</tr>
</tbody>
<tfoot>
<tr>
<th scope="row">#</th>
<td>Total</td>
<td>Total</td>
<td>Total</td>
<td>Total</td>
<td>Total</td>
</tr>
</tfoot>
</table>
</figure>
@ -98,6 +108,16 @@
&lt;<b>td</b>>Cell&lt;/<b>td</b>&gt;
&lt;/<b>tr</b>&gt;
&lt;/<b>tbody</b>&gt;
&lt;<b>tfoot</b>&gt;
&lt;<b>tr</b>&gt;
&lt;<b>th</b> <i>scope</i>=<u>"col"</u>&gt;#&lt;/<b>th</b>&gt;
&lt;<b>td</b> <i>scope</i>=<u>"col"</u>&gt;Total&lt;/<b>td</b>&gt;
&lt;<b>td</b> <i>scope</i>=<u>"col"</u>&gt;Total&lt;/<b>td</b>&gt;
&lt;<b>td</b> <i>scope</i>=<u>"col"</u>&gt;Total&lt;/<b>td</b>&gt;
&lt;<b>td</b> <i>scope</i>=<u>"col"</u>&gt;Total&lt;/<b>td</b>&gt;
&lt;<b>td</b> <i>scope</i>=<u>"col"</u>&gt;Total&lt;/<b>td</b>&gt;
&lt;/<b>tr</b>&gt;
&lt;/<b>tfoot</b>&gt;
&lt;/<b>table</b>&gt;</code></pre>
<p><code><i>role</i>=<u>"grid"</u></code> enable striped rows.</p>

File diff suppressed because one or more lines are too long

View file

@ -33,16 +33,20 @@ td {
text-align: start;
}
// Rows
tr {
background-color: var(--background-color);
// Footer
tfoot {
th,
td {
border-top: var(--border-width) solid var(--table-border-color);
border-bottom: 0;
}
}
// Striped
table {
&[role="grid"] {
tbody tr:nth-child(odd) {
--background-color: var(--table-row-stripped-background-color);
background-color: var(--table-row-stripped-background-color);
}
}
}

View file

@ -211,14 +211,15 @@ h5 {
}
// Table
thead {
thead,
tfoot {
th,
td {
--border-width: 3px;
}
}
:not(thead) > * > td {
:not(thead):not(tfoot) > * > td {
--font-size: 0.875em;
}