Conversation
This reverts commit 13e3440.
|
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
size-limit report 📦
|
HiDeoo
added a commit
to shubham-padia/starlight
that referenced
this pull request
Jul 15, 2025
* main: (26 commits) [ci] release (withastro#3296) Fix slug override with `/` value (withastro#3293) i18n(fr): update `guides/i18n.mdx` (withastro#3294) i18n(ko-KR): update `i18n.mdx` (withastro#3292) [ci] release (withastro#3286) Revert withastro#3281 (withastro#3291) i18n(de): update `guides/i18n.mdx` (withastro#3289) Fix Astro i18n config default locale issue (withastro#3288) docs: fix `t.exists()` documentation + example (withastro#3287) Make targeting sidebar links with CSS a little easier (withastro#3281) i18n(fr): update `resources/plugins.mdx` (withastro#3284) Extract main padding to CSS custom property (withastro#3282) i18n(de): update plugins translation (withastro#3285) i18n(ko-KR): update `plugins.mdx` (withastro#3283) Add link to the codeblock-fullscreen plugin (withastro#3279) Fix TabItem typo in zh-cn authoring-content.mdx (withastro#3268) (withastro#3269) [ci] format i18n(ru): update translations (withastro#3270) Update `sharp` in docs & examples to latest (withastro#3261) Add missing danish UI translations (withastro#3252) ...
Yoxnear
pushed a commit
to Yoxnear/starlight-custom
that referenced
this pull request
Jul 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This PR reverts the changes made in Make targeting sidebar links with CSS a little easier #3281
In Make targeting sidebar links with CSS a little easier #3281 we initially agreed to add a class name to every link in the sidebar. After approving and merging, I realised I hadn’t considered all the implications.
Sidebars are one of the heftier parts of Starlight’s HTML output. Especially for larger sites. For example, Astro’s docs currently include 215 links in its sidebar. This means any changes to sidebar entry markup can quickly accumulate given they can be reproduced 100s of time on every page (in the uncached HTML). Using the Astro docs example, this adds up to multiple kilobytes per page.
Given this, we discussed it a bit with the team and decided adding a class name like this is not justified. It is already feasible to target these links with CSS:
Adding a dedicated class name doesn’t provide any new functionality that is not currently available, and adds bloat to the HTML output, which may prove significant for content-heavy sites.