Uh oh!
There was an error while loading. Please reload this page.
doc: rewrite font sizes, add viewport meta - #15660
Conversation
cac3c18 to
994dee1Compare994dee1 to
675777eComparelarsch
commented
Sep 29, 2017
Looks great for me on desktop, also when resizing the window. Monospace font is strangely small on Chrome on Android (same problem i had with my attempts). Everything is small on Firefox on Android. Screenshots below. Android, Chrome, silverwind:doc-font-sizes:Android, Chome, current nodejs.org:Android, FireFox, silverwind:doc-font-sizes:Android, FireFox, current nodejs.org: |
silverwind
commented
Sep 29, 2017
Try clearing your browser cache on Android, you might not be getting the updated CSS file. |
larsch
commented
Sep 29, 2017
I believe I have done that now, but with same result. Server log claims to have sent full .css to mobile. |
@larsch: it works flawlessly on my Android 7. Try deleting your build files, IIRC there's some kind of bug where they are not refreshed sometimes: rm -rf out/doc/api && make doc-only && http-server out/doc/apiAnd if you're on mobile Chrome, make sure to clean your cache in the privacy settings. |
| pre, tt, code, .pre, span.type, a.type { | ||
| font-family: Monaco, Consolas, "Lucida Console", monospace; | ||
| font-size: .9em; |
There was a problem hiding this comment.
This is the one place where em is needed so it does not dramatically downsize code tags inside headings (which can be up to 2rem, and a .9rem code tag would look very bad in them).
larsch
commented
Sep 30, 2017
@silverwind: Deleting the build files did the trick. Now it looks good on my Android too! |
lpinca
commented
Oct 1, 2017
silverwind
commented
Oct 2, 2017
refack
commented
Oct 2, 2017
Preview available at http://node.refack.com.s3.amazonaws.com/index.html |
Fishrock123
commented
Oct 3, 2017
will try to review soon, assigning to try and remember |
lpinca
commented
Oct 3, 2017
silverwind
commented
Oct 3, 2017
@lpinca fixed, thanks: beforeafter |
lpinca
commented
Oct 4, 2017
refack
commented
Oct 5, 2017
silverwind
commented
Oct 6, 2017
@lpinca fixed, I restored the old font size. It looked okay with 1rem to me, but I guess it makes more sense to have it smaller. beforeafter |
silverwind
commented
Oct 9, 2017
Did some more minor tweaks, latest version here: https://silverwind.io/api/ I'll likely land this tomorrow unless there are objections. |
This makes the docs much more mobile-friendly by adding a viewport meta tag which makes mobile browers properly scale fonts. Additionally the font sizes have been cleaned up to use `rem` units where possible. Also included are some fixes for the version dropdown. PR-URL: #15660 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
silverwind
commented
Oct 10, 2017
Thanks. Landed in 6d9654b. |
This makes the docs much more mobile-friendly by adding a viewport meta tag which makes mobile browers properly scale fonts. Additionally the font sizes have been cleaned up to use `rem` units where possible. Also included are some fixes for the version dropdown. PR-URL: nodejs/node#15660 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Fix a line-height issue introduced in nodejs#15660 where paragraphs containing <code> blocks would have unequal line heights. Fixes: nodejs/nodejs.org#1399
Fix a line-height issue introduced in #15660 where paragraphs containing <code> blocks would have unequal line heights. Fixes: nodejs/nodejs.org#1399 PR-URL: #16200 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This makes the docs much more mobile-friendly by adding a viewport meta tag which makes mobile browers properly scale fonts. Additionally the font sizes have been cleaned up to use `rem` units where possible. Also included are some fixes for the version dropdown. PR-URL: #15660 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Fix a line-height issue introduced in #15660 where paragraphs containing <code> blocks would have unequal line heights. Fixes: nodejs/nodejs.org#1399 PR-URL: #16200 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
MylesBorins
commented
Nov 15, 2017
This does not land cleanly in v6.x LTS. Please feel free to manually backport by following the guide. Please also feel free to replace do-not-land if it is being backported |















Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
doc
Rewrote pretty much all font size definitions in the docs CSS. The
viewportmeta lets mobile browsers know the site is mobile-ready, which made most of the font size hacks obsolete.I converted most
emunits torembecause cascaded font sizes can lead to unwanted surprises. I retained a 90% size on monospace fonts because they appear to be more in-line with the variable width font. I also resolved a few issues that I've noticed surrounding the version selection dropdown, and one issue of a heading layout overflow.Screenshots at various widths:
Obsoletes: #15436