Skip to content

Reduce spacing between consecutive <dt> elements #2811

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

FloEdelmann
Copy link

What are you trying to accomplish?

See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dt:

multiple <dt> elements in a row indicate several terms that are all defined by the immediate next <dd> element

Example usage on GitHub: https://github.com/tummychow/git-absorb/blob/master/Documentation/git-absorb.adoc

Currently, those are separated by a 1rem margin, making them look like separate definitions (without a description):

grafik

What approach did you choose and why?

Reduce the spacing between consecutive <dt> elements to zero:

grafik

This is a similar approach to consecutive <li> elements and makes definition lists more readable.

What should reviewers focus on?

Can these changes ship as is?

  • Yes, this PR does not depend on additional changes. 🚢

@FloEdelmann FloEdelmann requested a review from a team as a code owner March 10, 2025 14:48
@FloEdelmann FloEdelmann requested a review from emilybrick March 10, 2025 14:48
Copy link

changeset-bot bot commented Mar 10, 2025

🦋 Changeset detected

Latest commit: e860b64

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/css Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented May 9, 2025

Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days.

@github-actions github-actions bot added Stale Automatically marked as stale. and removed Stale Automatically marked as stale. labels May 9, 2025
Copy link
Contributor

Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days.

@github-actions github-actions bot added the Stale Automatically marked as stale. label Jul 25, 2025
@Copilot Copilot AI review requested due to automatic review settings July 25, 2025 17:08
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the visual presentation of HTML definition lists by reducing spacing between consecutive <dt> (definition term) elements to better indicate they share a common definition.

  • Adds CSS rule to remove top margin from consecutive <dt> elements
  • Includes changelog entry for the minor version update

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/markdown/lists.scss Adds CSS selector dt + dt with margin-top: 0 to remove spacing between consecutive definition terms
.changeset/thirty-berries-sing.md Documents the change for the next minor release of @primer/css

@FloEdelmann
Copy link
Author

@emilybrick sorry to ping you, but apparently the bot tries to close this issue in 7 days and doesn't mind my comments. Since this pull request is still relevant, please keep it open (or review and merge it 😉)

@github-actions github-actions bot removed the Stale Automatically marked as stale. label Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant