Skip to content

Commit 68c0c07

Browse files
authored
Enforce style containment to <Steps> list items (#1948)
1 parent c4ef620 commit 68c0c07

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/cuddly-bugs-count.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@astrojs/starlight': patch
3+
---
4+
5+
Fixes a `<Steps>` component numbering issue with the next Chrome stable version when a step contains a nested list.

packages/starlight/user-components/Steps.astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const { html } = processSteps(content);
2323
padding-bottom: 1px;
2424
/* Prevent bullets from touching in short list items. */
2525
min-height: calc(var(--bullet-size) + var(--bullet-margin));
26+
/* Enforce style containment so that nested lists CSS counters are scoped to the contained element. */
27+
contain: style;
2628
}
2729
.sl-steps > li + li {
2830
/* Remove margin between steps. */

0 commit comments

Comments
 (0)