From b2586c46c317f377a761a2e6b92c3c5bcb8ab3e7 Mon Sep 17 00:00:00 2001 From: David Gilbertson Date: Wed, 19 Feb 2020 09:56:38 +1100 Subject: [PATCH] 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. --- doc/api_assets/style.css | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index 9b6be151420d6c..5799a777353ba7 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -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 {