From 68c0c077a9ca5ec2a8206e99b70236043a74c3b8 Mon Sep 17 00:00:00 2001 From: HiDeoo <494699+HiDeoo@users.noreply.github.com> Date: Tue, 4 Jun 2024 20:33:47 +0200 Subject: [PATCH] Enforce style containment to `` list items (#1948) --- .changeset/cuddly-bugs-count.md | 5 +++++ packages/starlight/user-components/Steps.astro | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/cuddly-bugs-count.md diff --git a/.changeset/cuddly-bugs-count.md b/.changeset/cuddly-bugs-count.md new file mode 100644 index 00000000000..00f53cd7491 --- /dev/null +++ b/.changeset/cuddly-bugs-count.md @@ -0,0 +1,5 @@ +--- +'@astrojs/starlight': patch +--- + +Fixes a `` component numbering issue with the next Chrome stable version when a step contains a nested list. diff --git a/packages/starlight/user-components/Steps.astro b/packages/starlight/user-components/Steps.astro index ffd65a35c6d..e768684c840 100644 --- a/packages/starlight/user-components/Steps.astro +++ b/packages/starlight/user-components/Steps.astro @@ -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. */