Skip to content

fix(ui): add content left padding#671

Open
OnkarRuikar wants to merge 5 commits intomdn:mainfrom
OnkarRuikar:content_left_margin
Open

fix(ui): add content left padding#671
OnkarRuikar wants to merge 5 commits intomdn:mainfrom
OnkarRuikar:content_left_margin

Conversation

@OnkarRuikar
Copy link
Contributor

@OnkarRuikar OnkarRuikar commented Aug 31, 2025

Description

Need to provide more space for # indicators on the left side. Current padding for the content sections is zero.

Motivation

Additional details

After fix gap:
1

@OnkarRuikar OnkarRuikar requested a review from a team as a code owner August 31, 2025 07:12
Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

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

I don't think the # indicator justifies taking away 1rem from the content area, so we should probably find a different solution.

I can think of two approaches:

  1. Reduce the size of the indicator, avoiding the overflow.
  2. Move the indicator behind the heading again (i.e. reverting mdn/yari#8532). To avoid mdn/yari#6647, we might be able to reserve space for the indicator behind the heading, even when hidden.

@caugner
Copy link
Contributor

caugner commented Sep 1, 2025

/cc @mdn/content-team

@OnkarRuikar
Copy link
Contributor Author

How about we reduce the right shift from -8em to -6rem. It looks a bit congested but it works:

hash.mp4

For this check the latest commit in your local.


Move the indicator behind the heading again (i.e. reverting mdn/yari#8532). To avoid mdn/yari#6647, we might be able to reserve space for the indicator behind the heading, even when hidden.

It looks weird when def list items in value sections show hash mark on left and headings show it on right :|

@OnkarRuikar OnkarRuikar requested a review from caugner September 2, 2025 07:30
@caugner caugner added the needs content decision This issue needs a decision from the MDN Content Team before it can proceed. label Oct 23, 2025
@caugner caugner requested a review from a team as a code owner October 23, 2025 14:06
@github-actions
Copy link
Contributor

bf48e08 was deployed to: https://fred-pr671.review.mdn.allizom.net/

Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

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

Tested on https://fred-pr671.review.mdn.allizom.net/en-US/docs/Web/CSS#how_to and looks better than the status quo:

Before:
image

After:
image

@LeoMcA Should we close in favor of #1154, or merge this for the time being?

@LeoMcA
Copy link
Member

LeoMcA commented Jan 30, 2026

#1154 would fix this for good, but it's up to @mdn/content-team if they want an interim fix

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

Labels

needs content decision This issue needs a decision from the MDN Content Team before it can proceed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Left sidebar scrollbar overlaps headings anchor icon

4 participants