Skip to content

Commit e6e38ec

Browse files
davidgilbertsontargos
authored andcommittedApr 22, 2020
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: #31859 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent a53980d commit e6e38ec

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed
 

‎doc/api_assets/style.css

+17-1
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,30 @@ table {
251251
th,
252252
td {
253253
border: 1px solid #aaa;
254-
padding: .75rem 1rem;
254+
padding: .5rem;
255255
vertical-align: top;
256256
}
257257

258258
th {
259259
text-align: left;
260260
}
261261

262+
td {
263+
word-break: break-all; /* Fallback if break-word isn't supported */
264+
word-break: break-word;
265+
}
266+
267+
@media only screen and (min-width: 600px) {
268+
th,
269+
td {
270+
padding: .75rem 1rem;
271+
}
272+
273+
td:first-child {
274+
word-break: normal;
275+
}
276+
}
277+
262278
ol,
263279
ul,
264280
dl {

0 commit comments

Comments
 (0)
Please sign in to comment.