doc: prevent tables from shrinking page

Tables on some pages (e.g. https://nodejs.org/api/crypto.html) are
quite wide because of long content (e.g. URLs) that don't break.
With this change, cell padding is smaller on small screens, and the
table content is allowed to break.

PR-URL: https://github.com/nodejs/node/pull/31859
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
David Gilbertson authored and Myles Borins committed 2020-03-11 14:21:10 -04:00
1 parent fa376f420c
commit 38329bd438
1 file changed
+17 -1
+17 -1
View File
@@ -251,7 +251,7 @@ table {
th,
td {
border: 1px solid #aaa;
padding: .75rem 1rem;
padding: .5rem;
vertical-align: top;
}
@@ -259,6 +259,22 @@ th {
text-align: left;
}
td {
word-break: break-all; /* Fallback if break-word isn't supported */
word-break: break-word;
}
@media only screen and (min-width: 600px) {
th,
td {
padding: .75rem 1rem;
}
td:first-child {
word-break: normal;
}
}
ol,
ul,
dl {