Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
doc: fix code display in header glitch#31460
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
himself65 commented Jan 22, 2020
XhmikosR commented Jan 22, 2020
Not sure if this really fixes the linked issue since AFAICT it's about rendering code blocks differently. That being said, not only padding but like most of the other properties could/should be removed. I don't have the time to dig into it more, but you should try: style.cssh1code,h2code,h3code,h4code,h5code,h6code{- font-weight: 700; - line-height: inherit; - position: relative; - margin: 1.5rem 0 1rem; - padding: inherit; - text-rendering: optimizeLegibility}which means separate the selectors like it was before your other patch. |
Trott commented Jan 22, 2020
That was intentionally omitted in headers, but now I can't remember why. I have a note-to-self to go back and see about making code blocks use a monospace font in headers, though. |
Trott commented Jan 22, 2020
The main complaint there, I think, is the big jarring spacing. So it fixes that. Minimal incremental change. |
Trott commented Jan 22, 2020
I think it was omitted in headers because then every single method and property would have the background and it was kind of jarring in headers. There might have also been an accessibility/contrast issue, but I'm not sure. We can try it, but I'd really greatly prefer to have that be separate from this spacing issue. The spacing issue should definitely be fixed immediately. The background color is a different thing and we can iterate that over time. |
Trott commented Jan 22, 2020
Happy to try that (and happier to have someone who knows what they're doing try that) but I'd really like to just get the spacing fixed with as few unanticipated side effects as possible, so I'd prefer this go in first and then someone (possibly me) can experiment with further revisions. |
Trott commented Jan 22, 2020
Oh, you know what? It might have been the padding had a grey background too so all the entries had this weird trail of grey background. So yeah, after this change, the background color change may work just fine..... |
XhmikosR commented Jan 22, 2020
Either way, one should look into splitting the selectors and removing redundant properties at some point. Not super-important but it should be done eventually. Just my 2 cents.
I can try to make a patch, I just don't have the time to build the docs so I can only quickly verify the changes in my browser. |
Trott commented Jan 22, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
FWIW, |
XhmikosR commented Jan 22, 2020
Yeah, my main dev VM is Windows. I know how to make it work, but I'd rather if things were truly cross-platform. Regardless, this PR does fix the weird space issue which was caused by inheriting the padding, so LGTM. An untested cleanup patch is here: https://github.com/XhmikosR/node/compare/master...XhmikosR-patch-1 |
GeoffreyBooth commented Jan 22, 2020
Personally I expect a code block in a heading to look similarly to how GitHub renders them: Heading with |
Trott commented Jan 22, 2020
Agreed. I'd prefer that be a subsequent enhancement. |
Fixes: nodejs#31451 PR-URL: nodejs#31460 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
Trott commented Jan 24, 2020
Landed in d32a715 |
This enables the grey background for inline code in headers. Refs: nodejs#31460 (comment) PR-URL: nodejs#31493 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Fixes: #31451 PR-URL: #31460 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
This enables the grey background for inline code in headers. Refs: #31460 (comment) PR-URL: #31493 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Fixes: #31451 PR-URL: #31460 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
This enables the grey background for inline code in headers. Refs: #31460 (comment) PR-URL: #31493 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Fixes: #31451 PR-URL: #31460 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
This enables the grey background for inline code in headers. Refs: #31460 (comment) PR-URL: #31493 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>

Fixes: #31451
@GeoffreyBooth @nodejs/website
Before:
After:
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes