Skip to content

Conversation

@bucknatt
Copy link
Contributor

@bucknatt bucknatt commented Dec 2, 2025

📄 Description

  • Base implementation is done with the tag styled with CSS.
  • By default, the top and bottom margins are defined by the tokens. But the users can still define the margin-top and the margin-bottom classes to change the spacing as following: 4px, 8px (default, so no classes), 16px, 24px, 32px, 40px). Users can define them separately for top and bottom.
  • Snapshot stories are created for the Divider component.
  • A documentation of the Divider is added to the /foundations/typography page.

🚀 Demo

image

🔮 Design review

  • Design review done
  • No design review needed

📝 Checklist

  • ✅ My code follows the style guidelines of this project
  • 🛠️ I have performed a self-review of my own code
  • 📄 I have made corresponding changes to the documentation
  • ⚠️ My changes generate no new warnings or errors
  • 🧪 I have added tests that prove my fix is effective or that my feature works
  • ✔️ New and existing unit tests pass locally with my changes

@bucknatt bucknatt requested review from a team as code owners December 2, 2025 10:32
@bucknatt bucknatt linked an issue Dec 2, 2025 that may be closed by this pull request
4 tasks
@changeset-bot
Copy link

changeset-bot bot commented Dec 2, 2025

🦋 Changeset detected

Latest commit: a9a923e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@swisspost/design-system-documentation Minor
@swisspost/design-system-styles Minor
@swisspost/design-system-components-angular-workspace Minor
@swisspost/design-system-components Minor
@swisspost/internet-header Minor
@swisspost/design-system-nextjs-integration Minor
@swisspost/design-system-styles-primeng-workspace Minor
@swisspost/design-system-styles-primeng Minor
@swisspost/design-system-components-react Minor
@swisspost/design-system-components-angular Minor
@swisspost/design-system-changelog-github Minor
@swisspost/design-system-eslint Minor
@swisspost/design-system-icons Minor
@swisspost/design-system-tokens Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@swisspost-bot
Copy link
Contributor

swisspost-bot commented Dec 2, 2025

Related Previews

@bucknatt bucknatt requested review from myrta2302 and removed request for oliverschuerch December 3, 2025 09:13
Copy link
Contributor

@myrta2302 myrta2302 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be a "minor" bump, since we’re adding something new.

@bucknatt bucknatt requested a review from myrta2302 December 5, 2025 14:16
Implemented a `Divider` component with styles using tokens and updated documentation.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 5, 2025

Copy link
Contributor

@oliverschuerch oliverschuerch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The styles are not matching the design:

Chrome:
Image
Image

Firefox:
image
image

Figma:
Image
Image

Check the user agent styles to see, which are causing the problem 😉

Image

'@swisspost/design-system-styles': minor
---

Implemented a `Divider` html/css component using tokens for styles. Divider documentation is also added to /Foundations/Typography page.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Implemented a `Divider` html/css component using tokens for styles. Divider documentation is also added to /Foundations/Typography page.
Implemented a `Divider` html/css component using tokens for styles. Divider documentation is also added to /Components/Divider page.

Comment on lines +19 to +22
<Canvas sourceState="shown" of={DividerStories.Default} />
<div className="hide-col-default">
<Controls of={DividerStories.Default} />
</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should mention here, that one can simply use our spacing utilities to change the default margin above/below.

e.g.

A dividers top and bottom default margin can be overridden by using our spacing utilities.

Comment on lines +26 to +28
## Usage

Dividers are often used within forms.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove that, as it does not provide any value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[html/css] Divider

5 participants