Skip to content

Commit

Permalink
Add guideline to last step of the <Steps> component (#2051)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Swithinbank <357379+delucis@users.noreply.github.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
  • Loading branch information
3 people authored Aug 16, 2024
1 parent 017c246 commit ec3b579
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .changeset/swift-laws-yawn.md
Original file line number Diff line number Diff line change
@@ -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;
}
```
2 changes: 1 addition & 1 deletion packages/starlight/user-components/Steps.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ec3b579

Please sign in to comment.