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 Michaël Zasso committed 2020-04-22 17:34:26 +02:00
1 parent a53980d947
commit e6e38ecf64
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 {