Skip to content
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

Enforce style containment to <Steps> list items #1948

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

HiDeoo
Copy link
Member

@HiDeoo HiDeoo commented Jun 4, 2024

Description

This pull request enforces style containment to the <Steps> component list items.

Even tho this change was not technically required until now, Chrome 126 having an Early Stable release date sets to Wed, Jun 5, 2024 breaks the current implementation.

Any <Steps> component containing a nested list items (Markdown/HTML list, tabs, file tree, etc.) will have its counter broken. Here is an example from the Starlight documentation with this change:

image

The change is probably part of Chrome re-write of CSS counters and ordered list numbering code but it's a bit difficult to figure out if the behavior is a bug or a proper implementation of the spec considering the whatwg repository contains many issues related to this topic, some efforts have been done to clarify the behavior but it's still a bit unclear and there seems to be some exceptions when the default counter (the one we use) is read from a ::before pseudo element.

I'll open an issue in the Chromium tracker altho, even if it ends up being a bug, a fix will probably take a while to be released (Wed, Aug 14, 2024 at the earliest) so I think it's better to enforce the style containment now considering it's the behavior we want.

Note that to reproduce the issue, you need at least Chrome Beta (126 at the time of the PR).

Copy link

changeset-bot bot commented Jun 4, 2024

🦋 Changeset detected

Latest commit: e132b8b

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

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Patch

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

vercel bot commented Jun 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
starlight ✅ Ready (Inspect) Visit Preview Jun 4, 2024 1:57pm

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Thank you for flagging this early and finding the fix @HiDeoo! 💖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 core Changes to Starlight’s main package 🌟 patch Change that triggers a patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants