Only apply responsive table styles to .rows-and-column

Otherwise they interfere with tables in the description, e.g. on
https://fivethirtyeight.datasettes.com/fivethirtyeight/nba-elo%2Fnbaallelo
pull/258/merge
Simon Willison 2018-05-20 08:10:46 -07:00
rodzic b8227556c6
commit 918de9403e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 17E2DEA2588B7F52
1 zmienionych plików z 10 dodań i 5 usunięć

Wyświetl plik

@ -37,23 +37,28 @@ table a:visited {
}
@media only screen and (max-width: 576px) {
/* Force table to not be like tables anymore */
table, thead, tbody, th, td, tr {
table.rows-and-columns,
.rows-and-columns thead,
.rows-and-columns tbody,
.rows-and-columns th,
.rows-and-columns td,
.rows-and-columns tr {
display: block;
}
/* Hide table headers (but not display: none;, for accessibility) */
thead tr {
.rows-and-columns thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
tr {
.rows-and-columns tr {
border: 1px solid #ccc;
margin-bottom: 1em;
}
td {
.rows-and-columns td {
/* Behave like a "row" */
border: none;
border-bottom: 1px solid #eee;
@ -61,7 +66,7 @@ table a:visited {
padding-left: 10%;
}
td:before {
.rows-and-columns td:before {
display: block;
margin-left: -10%;
font-size: 0.8em;