Skip to content

Conversation

@mayank99
Copy link

Description

This PR adds a negative margin to the <em> element which houses the current link (<a aria-current="page">) inside left-sidebar. The value of this negative margin is calculated as the sum of padding and border width.

It seems like this codebase mixes logical properties with physical properties everywhere, which is confusing and probably not intentional. For this PR, I've converted the border-left declaration within the same ruleset into its logical equivalent (border-inline-start) and also grouped it together with the padding-inline and margin-inline-start declarations for better readability / local reasoniing.

Motivation

This change was necessary for optical left alignment of all items within the same list.

Before After
Screenshot showing the beginning of Core modules. The active item in the list is emphasized with border and additional padding, producing additional space before the text starts Screenshot of the exact same UI but with the text inside the active item neatly aligned with the non-active items

Additional details

N/A

Related issues and pull requests

N/A

@mayank99 mayank99 requested a review from a team as a code owner January 17, 2026 21:04
@mayank99 mayank99 requested a review from LeoMcA January 17, 2026 21:04
@mayank99 mayank99 changed the title fix text alignment of current page in left-sidebar fix(left-sidebar): text alignment of current page Jan 17, 2026
Copy link
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

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

This causes an issue when the highlighted item is at the top level, where the accent is cut off:

Image

I'm touching the sidebar padding/margin in #1154 so it might be worth revisiting after that is merged.

Please also run prettier.

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.

2 participants