Skip to content

Commit

Permalink
Enforce style containment to <Steps> list items (#1948)
Browse files Browse the repository at this point in the history
  • Loading branch information
HiDeoo authored Jun 4, 2024
1 parent c4ef620 commit 68c0c07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/cuddly-bugs-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/starlight': patch
---

Fixes a `<Steps>` component numbering issue with the next Chrome stable version when a step contains a nested list.
2 changes: 2 additions & 0 deletions packages/starlight/user-components/Steps.astro
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ const { html } = processSteps(content);
padding-bottom: 1px;
/* Prevent bullets from touching in short list items. */
min-height: calc(var(--bullet-size) + var(--bullet-margin));
/* Enforce style containment so that nested lists CSS counters are scoped to the contained element. */
contain: style;
}
.sl-steps > li + li {
/* Remove margin between steps. */
Expand Down

0 comments on commit 68c0c07

Please sign in to comment.