-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: prevent tables from shrinking page #31859
Conversation
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.
@nodejs/website |
Refs #29692 I guess this works, although personally I'm used to |
Yeah that was my first thought, but I figured since the site HTML/CSS is pretty barebones, a CSS-only solution was more likely to make it through. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSLGTM
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 <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed in 7baadb3 |
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 <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
Checklist
This change prevents tables from growing so wide that they shrink the page on mobile.
Problem (currently on https://nodejs.org/api/crypto.html):
Now, on phones, table content will break if it has to, so the page loads the same width as all the other pages. The padding's a tiny bit less, too.
On larger screens, the first column is prevented from wrapping, since it often contains variables. Content in other columns will still wrap (note the URLs wrap, which they don't currently).