Skip to content

Conversation

hugomslv
Copy link
Contributor

@hugomslv hugomslv commented Sep 9, 2025

📄 Description

This PR renames viewport-based sizing utility classes from numeric values to named variants for consistency with percentage utilities.

🚀 Demo

If applicable, please add a screenshot or video to illustrate the changes.


📝 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

@hugomslv hugomslv requested a review from a team as a code owner September 9, 2025 08:59
@hugomslv hugomslv requested a review from leagrdv September 9, 2025 08:59
@hugomslv hugomslv linked an issue Sep 9, 2025 that may be closed by this pull request
Copy link

changeset-bot bot commented Sep 9, 2025

🦋 Changeset detected

Latest commit: cb06906

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-styles Major
@swisspost/design-system-components-angular-workspace Patch
@swisspost/design-system-components Major
@swisspost/design-system-documentation Patch
@swisspost/internet-header Major
@swisspost/design-system-nextjs-integration Patch
@swisspost/design-system-styles-primeng-workspace Patch
@swisspost/design-system-styles-primeng Major
@swisspost/design-system-components-react Major
@swisspost/design-system-components-angular Major
@swisspost/design-system-tokens Major
@swisspost/design-system-icons Major

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 Sep 9, 2025

Related Previews

@hugomslv hugomslv requested a review from leagrdv September 16, 2025 05:35
Copy link
Contributor

@leagrdv leagrdv left a comment

Choose a reason for hiding this comment

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

Could you also update the information in the documentation regarding those viewport sizing utility classes?

@hugomslv hugomslv requested a review from leagrdv September 16, 2025 11:08
Copy link
Contributor

@leagrdv leagrdv left a comment

Choose a reason for hiding this comment

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

Please update the documentation as well as the snapshots accordingly. Updating the snapshots will also help you test that the new classes are working correctly.

update documentation
@hugomslv hugomslv requested a review from a team as a code owner September 23, 2025 07:45
@hugomslv hugomslv requested a review from leagrdv September 30, 2025 12:50
Copy link

Comment on lines +60 to +61
> - `vw-quarter`, `vw-third`, `vw-half`, `vw-two-thirds`, `vw-three-quarters`, `vw-full`
> - `vh-quarter`, `vh-third`, `vh-half`, `vh-two-thirds`, `vh-three-quarters`, `vh-full`
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
> - `vw-quarter`, `vw-third`, `vw-half`, `vw-two-thirds`, `vw-three-quarters`, `vw-full`
> - `vh-quarter`, `vh-third`, `vh-half`, `vh-two-thirds`, `vh-three-quarters`, `vh-full`
> - `vw-{suffix}`, `vh-{suffix}`

${samples.map(
sample => html`
<div class="grid-item snapshot">
<div class="${generateClassNames(sample, true)}"></div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Only the vw and vh classes are being tested here, please update generateClassNames to also have tests for min and max

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.

Rename viewport based sizing utility classes
3 participants