Skip to content
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

Remove padding when code spans/code link spans are adjacent #62867

Open
Nemo157 opened this issue Jul 22, 2019 · 7 comments
Open

Remove padding when code spans/code link spans are adjacent #62867

Nemo157 opened this issue Jul 22, 2019 · 7 comments
Assignees
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@Nemo157
Copy link
Member

Nemo157 commented Jul 22, 2019

I used

[`Stream`](futures::stream::Stream)`<Item = `[`io::Result`](std::io::Result)`<`[`Bytes`](bytes::Bytes)`>>`

in some crates documentation which renders as

concated-code

There is currently a 0.1em padding applied inside all code spans causing the spacing to look weird. It seems like adjacent code spans (including ones wrapped inside <a>) should have the padding suppressed so they render as if they were one code span.

@jonas-schievink jonas-schievink added C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 22, 2019
@GuillaumeGomez
Copy link
Member

There was a reason for this. I'll check why.

@GuillaumeGomez
Copy link
Member

The reason why:

Screenshot from 2019-07-23 13-39-45

It's not very nice looking on "normal" blocks to not have a bit of padding.

@GuillaumeGomez
Copy link
Member

I've got an idea on how to fix. Let's put it to try!

@GuillaumeGomez
Copy link
Member

Won't work, CSS is too limited for that. The only solution I see currently would be to be able to detect that code tags are following each others and merging them as one.

@dtolnay
Copy link
Member

dtolnay commented Jul 23, 2019

Here is how I currently work around this in Syn (without merging code tags):

@GuillaumeGomez
Copy link
Member

That's something! 🤣

@camelid camelid self-assigned this Apr 9, 2021
@camelid camelid added A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-feature-request Category: A feature request, i.e: not implemented / a PR. and removed C-bug Category: This is a bug. labels Apr 9, 2021
@camelid
Copy link
Member

camelid commented Apr 9, 2021

I had an idea on how to implement this in #80733 (comment). I think I might try doing that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants