Repository navigation
fix(theme-classic): don't render an empty class attribute on MDX links - #13087
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Size Change: -18.6 kB (-0.15%) Total Size: 12.1 MB 📦 View Changed
ℹ️ View Unchanged
|
⚡️ Lighthouse report for the deploy preview of this PR
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
|
Size Change: -18.6 kB (-0.15%) Total Size: 12.1 MB 📦 View Changed
ℹ️ View Unchanged
|
Motivation
The MDX
Atheme component always passes aclsx()result asclassName. Without an anchor target class and a user class,clsx()returns"", so every MDX link renders an emptyclass=""attribute:It only passes a
classNamewhen it isn't empty.Test Plan
Website build (
BUILD_FAST=true docusaurus build --locale en), before and after this PR:<a … class="">: 11341 → 0Expect Argos text-snapshot (HTML) diffs on most pages, but no screenshot diff.
Follow-ups
The same
clsx()→class=""pattern remains on other commonly rendered elements, for stacked PRs:MDXComponents/Li: every Markdown list item (~10000<li class="">). It also passesclassNamebefore{...props}, so aprops.classNameoverrides the anchor target class.NavbarItem/HtmlNavbarItem: the HTML items of desktop navbar dropdowns, like the<hr>separators of the version dropdown.BlogPostItem:<article class="">on blog post pages.Test links
Deploy preview: https://deploy-preview-13087--docusaurus-2.netlify.app/
Related issues/PRs
Introduced by #11289 and #11466
🤖 Generated with Claude Code
Summary by CodeRabbit