Skip to content

Conversation

bucknatt
Copy link
Contributor

📄 Description

The position utility classes allow defining the inset of an element. The classes available are

  • top-[position]
  • bottom-[position]
  • start-[position]
  • end-[position]

where [position] can be 0, 50, or 100.

The goal was to improve these position utilities and their documentation by:

  • inline-* and block-* properties: Replaced top, bottom, right and left with
    inset-block-start, inset-block-end, inset-inline-start and inset-inline-end.
  • Added a control for the bottom-* and end-* classes in the position utility documentation.

Consequently classes for bottom and end were added to the SCSS variables on styles.

@bucknatt bucknatt requested review from a team as code owners August 15, 2025 08:04
@bucknatt bucknatt linked an issue Aug 15, 2025 that may be closed by this pull request
2 tasks
@swisspost-bot
Copy link
Contributor

swisspost-bot commented Aug 15, 2025

Related Previews

Copy link

changeset-bot bot commented Aug 15, 2025

🦋 Changeset detected

Latest commit: 3e1fdc3

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

This PR includes changesets to release 12 packages
Name Type
@swisspost/design-system-documentation Minor
@swisspost/design-system-styles Minor
@swisspost/design-system-components-angular-workspace Patch
@swisspost/design-system-components Minor
@swisspost/internet-header Minor
@swisspost/design-system-nextjs-integration Patch
@swisspost/design-system-styles-primeng-workspace Patch
@swisspost/design-system-styles-primeng Minor
@swisspost/design-system-components-react Minor
@swisspost/design-system-components-angular Minor
@swisspost/design-system-tokens Minor
@swisspost/design-system-icons 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

alionazherdetska added a commit that referenced this pull request Aug 20, 2025
… `unset` for better clarity (#6049)

## 📄 Problem

The `overflow` utilities component in Storybook has `empty label`
options in the dropdown controls, similar to the issue that was recently
addressed for position utilities in PR
#6002. This creates a
poor user experience as users can't understand what the empty option
represents.
<img width="1381" height="335" alt="image"
src="https://github.com/user-attachments/assets/ae620761-b1f1-46fa-85df-715facbe7330"
/>

## Description

In this PR I replaced empty string options with `'unset'` in all
overflow controls (`overflow`, `overflowX`, `overflowY`).

---

## 📝 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
Copy link
Contributor

@alionazherdetska alionazherdetska left a comment

Choose a reason for hiding this comment

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

Just a small improvement for the changeset and then it is good to go!

Copy link

@bucknatt bucknatt merged commit d54ea3f into main Aug 25, 2025
13 checks passed
@bucknatt bucknatt deleted the 5971-improve-position-utilities branch August 25, 2025 11:52
gfellerph pushed a commit that referenced this pull request Aug 25, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @swisspost/[email protected]

### Major Changes

-   Simplified the banner and toast components:
    -   Removed the `icon` property; icons are no longer configurable
    -   Removed the `neutral` variant; the default is now `info`
- Renamed the `danger` variant to `error` (by
[@alizedebray](https://github.com/alizedebray) with
[#6063](#6063))

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Major Changes

-   Simplified the banner and toast components:
    -   Removed the `icon` property; icons are no longer configurable
    -   Removed the `neutral` variant; the default is now `info`
- Renamed the `danger` variant to `error` (by
[@alizedebray](https://github.com/alizedebray) with
[#6063](#6063))

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Major Changes

-   Simplified the banner and toast components:
    -   Removed the `icon` property; icons are no longer configurable
    -   Removed the `neutral` variant; the default is now `info`
- Renamed the `danger` variant to `error` (by
[@alizedebray](https://github.com/alizedebray) with
[#6063](#6063))

### Patch Changes

- Added file extensions in relative import/export statements to make
them browser conform. (by
[@oliverschuerch](https://github.com/oliverschuerch) with
[#6082](#6082))
-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Major Changes

-   Simplified the banner and toast components:
    -   Removed the `icon` property; icons are no longer configurable
    -   Removed the `neutral` variant; the default is now `info`
- Renamed the `danger` variant to `error` (by
[@alizedebray](https://github.com/alizedebray) with
[#6063](#6063))

### Minor Changes

- Added missing `bottom` and `end` controls to position utilities for
complete configuration. Replaced empty label option with `unset` for
better clarity across all position controls (`top`, `bottom`, `start`,
`end`).
Position utilities now use logical CSS inset properties
(inset-block-start, inset-block-end, inset-inline-start,
inset-inline-end).
This means `start` and `end` follow the writing direction — left in LTR
and right in RTL. (by [@bucknatt](https://github.com/bucknatt) with
[#6002](#6002))

## @swisspost/[email protected]

### Minor Changes

- Added icons: `2698`, `2699`, `2700`, `2701`, `2702`, `2703`, `2704`,
`2705`, `2706`, `2707`, `2708`, `2709`, `2710`, `2711`, `2712` and
`2713` (by [@swisspost-bot](https://github.com/swisspost-bot) with
[#6083](#6083))

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]



## @swisspost/[email protected]

### Minor Changes

- Added missing `bottom` and `end` controls to position utilities for
complete configuration. Replaced empty label option with `unset` for
better clarity across all position controls (`top`, `bottom`, `start`,
`end`).
Position utilities now use logical CSS inset properties
(inset-block-start, inset-block-end, inset-inline-start,
inset-inline-end).
This means `start` and `end` follow the writing direction — left in LTR
and right in RTL. (by [@bucknatt](https://github.com/bucknatt) with
[#6002](#6002))

### Patch Changes

-   Simplified the banner and toast components:
    -   Removed the `icon` property; icons are no longer configurable
    -   Removed the `neutral` variant; the default is now `info`
- Renamed the `danger` variant to `error` (by
[@alizedebray](https://github.com/alizedebray) with
[#6063](#6063))
-   Updated dependencies:
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

Improve position utilities
4 participants