summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiDeoo2024-06-04 20:33:47 +0200
committerGitHub2024-06-04 20:33:47 +0200
commit68c0c077a9ca5ec2a8206e99b70236043a74c3b8 (patch)
treed54d9b3a317638e8df3fe74807b560dbc5a352de
parentc4ef620417ee8dda483d8066f48aa059e1a4266c (diff)
downloadIT.starlight-68c0c077a9ca5ec2a8206e99b70236043a74c3b8.tar.gz
IT.starlight-68c0c077a9ca5ec2a8206e99b70236043a74c3b8.tar.bz2
IT.starlight-68c0c077a9ca5ec2a8206e99b70236043a74c3b8.zip
Enforce style containment to `<Steps>` list items (#1948)
-rw-r--r--.changeset/cuddly-bugs-count.md5
-rw-r--r--packages/starlight/user-components/Steps.astro2
2 files changed, 7 insertions, 0 deletions
diff --git a/.changeset/cuddly-bugs-count.md b/.changeset/cuddly-bugs-count.md
new file mode 100644
index 00000000..00f53cd7
--- /dev/null
+++ b/.changeset/cuddly-bugs-count.md
@@ -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.
diff --git a/packages/starlight/user-components/Steps.astro b/packages/starlight/user-components/Steps.astro
index ffd65a35..e768684c 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. */