diff options
author | HiDeoo | 2024-08-16 11:32:59 +0200 |
---|---|---|
committer | GitHub | 2024-08-16 11:32:59 +0200 |
commit | ec3b5794cac55a5755620fa5e205f0d54c9e343b (patch) | |
tree | 40ef2f504ad253937875b328a098d6a6d11ba8bc | |
parent | 017c24663802924899d2b83c258a5c24d14d5376 (diff) | |
download | IT.starlight-ec3b5794cac55a5755620fa5e205f0d54c9e343b.tar.gz IT.starlight-ec3b5794cac55a5755620fa5e205f0d54c9e343b.tar.bz2 IT.starlight-ec3b5794cac55a5755620fa5e205f0d54c9e343b.zip |
Add guideline to last step of the `<Steps>` component (#2051)
Co-authored-by: Chris Swithinbank <357379+delucis@users.noreply.github.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
-rw-r--r-- | .changeset/swift-laws-yawn.md | 14 | ||||
-rw-r--r-- | packages/starlight/user-components/Steps.astro | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/.changeset/swift-laws-yawn.md b/.changeset/swift-laws-yawn.md new file mode 100644 index 00000000..89c4178b --- /dev/null +++ b/.changeset/swift-laws-yawn.md @@ -0,0 +1,14 @@ +--- +'@astrojs/starlight': minor +--- + +Adds a guideline to the last step of the `<Steps>` component. + +If you want to preserve the previous behaviour and hide the guideline on final steps, you can add the following custom CSS to your site: + +```css +/* Hide the guideline for the final step in <Steps> lists. */ +.sl-steps > li:last-of-type::after { + background: transparent; +} +``` diff --git a/packages/starlight/user-components/Steps.astro b/packages/starlight/user-components/Steps.astro index 66562555..c66dffb1 100644 --- a/packages/starlight/user-components/Steps.astro +++ b/packages/starlight/user-components/Steps.astro @@ -51,7 +51,7 @@ const { html } = processSteps(content); } /* Vertical guideline linking list numbers. */ - .sl-steps > li:not(:last-of-type)::after { + .sl-steps > li::after { --guide-width: 1px; content: ''; position: absolute; |