-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Stray spacing of code blocks containing injected main #1433
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
Comments
Correct. That code block does not have an injected mdBook/guide/src/format/mdbook.md Lines 21 to 28 in 3d55375
|
I posted #1806 with a proposed fix. I would appreciate if you could take a look and see if you have any thoughts. I posted a demo at https://ehuss.github.io/rust-book/. If you could look through some examples, try different browsers and platforms, different color themes, etc. If you have access to Android, that would particularly be nice to test since I don't have access to that. |
Android/Firefox: Chrome looks substantially identical. The non-editable code blocks look passable to me, certainly better than before your change. The editable ones are not getting the same padding and are not so good I think. What if we offset the icons by half a line upwards, so that they are half in/half out of the box? Then we could get away with less padding on those non-editable code blocks, since I think I'd prefer less than what's in the screenshot. If half in/half out looks janky, they could get either a tab (background extending up in the vicinity of the icons) or notch (background carved downward away from the vicinity of the icons). |
For example see the first code block in https://doc.rust-lang.org/1.47.0/book/ch03-02-data-types.html.
Screenshot:
The text was updated successfully, but these errors were encountered: