Skip to content

[Bug] <details> content is not padded beneath its <summary>. #1811

Description

@beedell-roke

Errata (Examples)

This is paragraph 1. This is paragraph 1.

This is paragraph 2. This is paragraph 2.

<details open> <!-- the padding issue solely appears when it's open, but irrespective of whether this is determined programmatically or not -->

This is paragraph 3. This is paragraph 3.

This is paragraph 4. This is paragraph 4.

</details>

…renders as:

  1. Browser

    This is paragraph 1. This is paragraph 1.

    This is paragraph 2. This is paragraph 2.

    Details

    This is paragraph 3. This is paragraph 3.

    This is paragraph 4. This is paragraph 4.

  2. Screenshot

    image

Evidently, the padding is inconsistent.

Affected

As bypassed, as #issuecomment-3193630451 explains:

Details

  1. ActivityWatch/aw-qt/issues/113

  2. issues/2005#issue-3553990404

  3. mysociety/alaveteli/issues/8958#issue-3566436614

  4. dotnet/runtime/issues/122721#issuecomment-3690557017

  5. element-hq/element-web/issues/29244#issue-2845987401

  6. webcompat/web-bugs/issues/199619#issue-3798405115

  7. postgres-ai/postgres_ai/issues/24#issue-3806430202

  8. canonical/ubuntu.com/issues/14859#issuecomment-3784475313

  9. ksnip/ksnip/issues/1119#issue-3060851532

  10. issues/2000#issue-3522107604

  11. orgs/community/discussions/162311#discussioncomment-15667344

  12. opencollective/opencollective/issues/8593#issue-3980347589

  13. quickemu-project/quickemu/issues/1902#issue-4244237317

  14. quickemu-project/quickemu/issues/1903#issue-4244319455

  15. warpdotdev/warp/issues/9211#issuecomment-4361821404

Activity

  1. changed the title [-]`<details>` tag content is not padded correctly.[/-] [+]`<details>` content is not padded beneath its `<summary>`.[/+] on Jun 12, 2024
  2. github-actions commented on Aug 12, 2024

    @github-actions

    Stale issue message

  3. beedell-roke commented on Aug 12, 2024

    @beedell-roke
    Author
  4. github-actions commented on Oct 13, 2024

    @github-actions

    Stale issue message

  5. beedell-roke commented on Oct 13, 2024

    @beedell-roke
    Author
  6. github-actions commented on Feb 15, 2025

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  7. beedell-roke commented on Feb 15, 2025

    @beedell-roke
    Author
  8. github-actions commented on Apr 17, 2025

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  9. 1 remaining item

  10. changed the title [-]`<details>` content is not padded beneath its `<summary>`.[/-] [+][Bug] `<details>` content is not padded beneath its `<summary>`.[/+] on Jun 16, 2025
  11. github-actions commented on Aug 16, 2025

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  12. beedell-roke commented on Aug 16, 2025

    @beedell-roke
    Author
  13. beedell-roke commented on Aug 16, 2025

    @beedell-roke
    Author

    I've since ascertained that <p></p><details><p></p> and <p></p></details><p></p> remediate this.

  14. github-actions commented on Oct 16, 2025

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  15. beedell-roke commented on Oct 16, 2025

    @beedell-roke
    Author
  16. beedell-roke commented on Apr 20, 2026

    @beedell-roke
    Author
  17. zkoppert commented on Apr 24, 2026

    @zkoppert
    Member

    Thanks for reporting this.

    After investigating, this issue is about padding on <details> elements, which is handled by GitHub.com's frontend CSS — not by this repository.

    This repo (github/markup) only handles step 1 of the rendering pipeline: converting markup formats (RST, AsciiDoc, MediaWiki, etc.) to raw HTML. Check out this part of the README for a fuller picture:

    Please note that only the first step is covered by this gem — the rest happens on GitHub.com's backend.

    CSS styling, padding, margins, and image sizing are all applied downstream by GitHub.com's frontend. This repo has no control over those.

    For CSS/styling feedback, GitHub's feedback discussions would be the right place to raise this.

    Closing as out of scope for this repository.

  18. beedell-roke commented on Apr 24, 2026

    @beedell-roke
    Author

    I have re-submitted this at orgs/community/discussions/193801. @zkoppert, please re-close as invalid.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions