design-system icon indicating copy to clipboard operation
design-system copied to clipboard

feat(tokens , styles): palettes 2.0

Open alizedebray opened this issue 8 months ago โ€ข 4 comments

๐Ÿ“„ Description

Please include a summary of the changes made in this PR.

๐Ÿš€ 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

alizedebray avatar Apr 09 '25 14:04 alizedebray

๐Ÿฆ‹ Changeset detected

Latest commit: 40391d8de7f2b8ecd2aaeeb8e484fd0bc2649451

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

changeset-bot[bot] avatar Apr 09 '25 14:04 changeset-bot[bot]

Related Previews

  • https://preview-5250--swisspost-design-system-next.netlify.app

swisspost-bot avatar Apr 09 '25 14:04 swisspost-bot

The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

Name Status Preview Comments Updated (UTC)
design-system-documentation โŒ Failed (Inspect) May 7, 2025 1:18pm

vercel[bot] avatar May 07 '25 13:05 vercel[bot]

It seems, that the palettes accent- and nested-colors are not set up correctly yet. Regarding these colors, the design is in a tryout state right now.

oliverschuerch avatar Jun 03 '25 07:06 oliverschuerch

There is still an issue with the body color, this does not work:

<!DOCTYPE html>
<html lang="en" data-color-scheme="dark">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Styles playground</title>
    <link rel="stylesheet" id="styles" href="src/cargo-default.scss" />
    <script src="playground.js" defer></script>
  </head>
  <body>
    <div data-color-scheme="light" style="background-color: aliceblue">
      <h2>Hello</h2>
      <p><a>World</a></p>
    </div>
  </body>
</html>

image


To fix this issue, two adjustments are necessary:

  1. The text color is limited to only two possible value, either white or dark grey, based on the current color scheme. This means the text color should be directly set using the light-dark() function instead of being set from the palettes layer.
  2. Whenever a selector applies a color scheme (e.g., using [data-color-scheme]), the color property must be explicitly reset to ensure the text color matches the scheme. This prevents unintended color inheritance or overrides.

alizedebray avatar Jun 18 '25 13:06 alizedebray

It looks fine to me.

rouvenpost avatar Jul 14 '25 07:07 rouvenpost

@oliverschuerch Reviewed the hex colors for every variant and all looks correct.

sandra-post avatar Jul 14 '25 09:07 sandra-post

I'm setting "Request changes" again so that I don't see it in my list of PRs to review as there has not been any changes from the previous review. Otherwise I'll just miss it when you will have done the changes on the schemes file ๐Ÿ˜‰

I did it. The PR is ready to be merged imo. Since the merge is blocked through a review, I'm currently leaving the PR unmerged (unlike what was discussed this morning). I'm having a quick meeting on Monday anyway with @gfellerph and @alizedebray and we can discuss it there who will take the honor to merge it.

oliverschuerch avatar Jul 18 '25 16:07 oliverschuerch