pico/scss/content/_table.scss
Lucas Larroche 41314ab4b0 Revert "Merge branch 'master' into dev"
This reverts commit 6a6d67dbab230a058b494f6a468ed5f4423f1c4c, reversing
changes made to ba4bd765d8fb28466d816c098b03476754c13fc3.
2021-12-19 09:50:55 +07:00

49 lines
1.1 KiB
SCSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* Table
*/
// Reboot based on :
// - normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
// - sanitize.css v12.0.1 | CC0 1.0 Universal | github.com/csstools/sanitize.css
//
// 1. Collapse border spacing in all browsers (opinionated).
// 2. Correct table border color inheritance in all Chrome, Edge, and Safari.
// 3. Remove text indentation from table contents in Chrome, Edge, and Safari.
table {
width: 100%;
border-color: inherit; // 2
border-collapse: collapse; // 1
border-spacing: 0;
text-indent: 0; // 3
}
// Pico
//
// Cells
th,
td {
padding: calc(var(--spacing) / 2) var(--spacing);
border-bottom: var(--border-width) solid var(--table-border-color);
color: var(--color);
font-weight: var(--font-weight);
font-size: var(--font-size);
text-align: left;
text-align: start;
}
// Rows
tr {
background-color: var(--background-color);
}
// Striped
table {
&[role="grid"] {
tbody tr:nth-child(odd) {
--background-color: var(--table-row-stripped-background-color);
}
}
}