Skip to content

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

Closed

Description

@Nemo157

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.

Activity

  1. added
    C-bugCategory: This is a bug.
    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
    on Jul 22, 2019
  2. GuillaumeGomez commented on Jul 23, 2019

    @GuillaumeGomez
    Member

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

  3. GuillaumeGomez commented on Jul 23, 2019

    @GuillaumeGomez
    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.

  4. GuillaumeGomez commented on Jul 23, 2019

    @GuillaumeGomez
    Member

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

  5. GuillaumeGomez commented on Jul 23, 2019

    @GuillaumeGomez
    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.

  6. dtolnay commented on Jul 23, 2019

    @dtolnay
    Member
  7. GuillaumeGomez commented on Jul 23, 2019

    @GuillaumeGomez
    Member

    That's something! 🤣

  8. self-assigned this
    on Apr 9, 2021
  9. added
    A-rustdoc-uiArea: Rustdoc UI (generated HTML)
    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.
    and removed
    C-bugCategory: This is a bug.
    on Apr 9, 2021
  10. camelid commented on Apr 9, 2021

    @camelid
    Member

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

  11. hkBst commented on Jan 29, 2025

    @hkBst
    Member

    What is the status of this?

  12. GuillaumeGomez commented on Jan 29, 2025

    @GuillaumeGomez
    Member

    Forgot about it. Putting it back into my todo list.

  13. GuillaumeGomez commented on Jan 30, 2025

    @GuillaumeGomez
    Member

    Opened #136308.

  14. notriddle commented on Apr 9, 2025

    @notriddle
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-rustdoc-uiArea: Rustdoc UI (generated HTML)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions