-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(styles): add palettes #3850
Conversation
🦋 Changeset detectedLatest commit: 698620b The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
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 |
Related Previews |
f88ba29
to
51d48ab
Compare
Accessibility tests are failing because of incorrect tokens. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looking good, though the tokens seem not to be up to date/working atm.
packages/documentation/src/stories/foundation/palette/palette.stories.ts
Outdated
Show resolved
Hide resolved
2140c96
to
a37cd51
Compare
Tokens are now working for all theme and scheme combinations. However, there's still a problem with the dark color scheme, which can be seen in the palettes documentation. The problem seems to be that CSS custom properties declared in the Suggested solution: The palettes logic is based on a workaround that uses hard-coded token maps from this file. I therefore recommend using these token maps to define the foreground and background colors of each palette directly. This way, we avoid relying on CSS variables. |
aaa77b9
to
60cd2ed
Compare
|
||
Palettes may also include a specific text color that is different from the body color. | ||
You can apply this text color to any element by using the `.palette-text` class. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm missing documentation for people who'd like to implement palettes, without using an entry file. What files are necessary to just get palettes to work and where can they be found?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I created a separate ticket for that since it requires changes to the StylesPackageImport component: #4025
Limitations for the body color:
|
68776a9
to
2479b4b
Compare
Quality Gate passedIssues Measures |
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 - Renamed the alert component to banner and updated the styles of banner and toast components. The class `.alert` is still supported for now but is deprecated and will be removed in v10. Changed web component `<post-alert>` to `<post-banner>`. Additionally, the classes `.{toast|alert}-primary`, `.{toast|alert}-gray` and `.toast-notification` have been deprecated. (by [@leagrdv](https://github.com/leagrdv) with [#3862](#3862)) - Removed the `alert-fixed-bottom` variant of the alert. (by [@leagrdv](https://github.com/leagrdv) with [#3862](#3862)) ### Patch Changes - Updated dependencies: - @swisspost/[email protected] ## @swisspost/[email protected] ### Major Changes - Renamed the alert component to banner and updated the styles of banner and toast components. The class `.alert` is still supported for now but is deprecated and will be removed in v10. Changed web component `<post-alert>` to `<post-banner>`. Additionally, the classes `.{toast|alert}-primary`, `.{toast|alert}-gray` and `.toast-notification` have been deprecated. (by [@leagrdv](https://github.com/leagrdv) with [#3862](#3862)) - Removed size variants for form select. The sizing classes `.form-select-sm`, `.form-select-rg`, `.form-select-md` and `.form-select-lg` no longer have any effect and can be removed safely. (by [@leagrdv](https://github.com/leagrdv) with [#3978](#3978)) - Removed the `alert-fixed-bottom` variant of the alert. (by [@leagrdv](https://github.com/leagrdv) with [#3862](#3862)) - Removed sizes option for text inputs. (by [@leagrdv](https://github.com/leagrdv) with [#3946](#3946)) - Removed deprecated `topic-teaser`. (by [@leagrdv](https://github.com/leagrdv) with [#4056](#4056)) - Changed the class name of assistive text below form fields from `.form-text` to `.form-hint` and improved accessibility by connecting the hint to the form through `aria-describedby`. (by [@leagrdv](https://github.com/leagrdv) with [#3961](#3961)) ### Minor Changes - Added a new `segmented-button` component, which allows users to toggle between two or more content sections within the same area on the screen. (by [@alionazherdetska](https://github.com/alionazherdetska) with [#3879](#3879)) - Internalized bootstrap overflow utilities into the design system. (by [@leagrdv](https://github.com/leagrdv) with [#4006](#4006)) - Updated radio-button styles with Design Tokens. (by [@schaertim](https://github.com/schaertim) with [#3965](#3965)) - Addes Cargo theme styles. (by [@alizedebray](https://github.com/alizedebray) with [#3993](#3993)) - Updated `.form-select` select to v2. (by [@leagrdv](https://github.com/leagrdv) with [#3978](#3978)) - Updated checkbox styles with Design Tokens. (by [@schaertim](https://github.com/schaertim) with [#3965](#3965)) - Updated switch styles with Design Tokens. (by [@schaertim](https://github.com/schaertim) with [#3965](#3965)) - Added color palettes to easily apply colors to a page section using predefined color sets. (by [@alizedebray](https://github.com/alizedebray) with [#3850](#3850)) ### Patch Changes - Updated `.form-control` text input to new Post design. (by [@leagrdv](https://github.com/leagrdv) with [#3946](#3946)) - Updated the blockquote styles to match the new Post design. (by [@myrta2302](https://github.com/myrta2302) with [#3882](#3882)) ## @swisspost/[email protected] ### Minor Changes - Export new SASS maps for Post and Cargo palettes, directly linking to the raw color values for both light and dark color schemes. (by [@alizedebray](https://github.com/alizedebray) with [#3992](#3992)) ## @swisspost/[email protected] ### Patch Changes - Updated dependencies: - @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] ### Patch Changes - Updated dependencies: - @swisspost/[email protected] ## @swisspost/[email protected] ## @swisspost/[email protected] ## @swisspost/[email protected] ### Major Changes - Removed deprecated `topic-teaser`. (by [@leagrdv](https://github.com/leagrdv) with [#4056](#4056)) ### Minor Changes - Added a new `segmented-button` component, which allows users to toggle between two or more content sections within the same area on the screen. (by [@alionazherdetska](https://github.com/alionazherdetska) with [#3879](#3879)) - Internalized bootstrap overflow utilities into the design system. (by [@leagrdv](https://github.com/leagrdv) with [#4006](#4006)) - Renamed the alert component to banner and updated the styles of banner and toast components. The class `.alert` is still supported for now but is deprecated and will be removed in v10. Changed web component `<post-alert>` to `<post-banner>`. Additionally, the classes `.{toast|alert}-primary`, `.{toast|alert}-gray` and `.toast-notification` have been deprecated. (by [@leagrdv](https://github.com/leagrdv) with [#3862](#3862)) - Simplified the markup structure for checkboxes by removing the need to use the classes `.form-check-input` and `.form-check-label` on the input field and the label respectively. You can safely remove these classes from your markup, they no longer have any effect. (by [@schaertim](https://github.com/schaertim) with [#3965](#3965)) - Addes Cargo theme styles. (by [@alizedebray](https://github.com/alizedebray) with [#3993](#3993)) - Updated `.form-select` select to v2. (by [@leagrdv](https://github.com/leagrdv) with [#3978](#3978)) - Added color palettes to easily apply colors to a page section using predefined color sets. (by [@alizedebray](https://github.com/alizedebray) with [#3850](#3850)) ### Patch Changes - Updated `.form-control` text input to new Post design. (by [@leagrdv](https://github.com/leagrdv) with [#3946](#3946)) - Updated the blockquote styles to match the new Post design. (by [@myrta2302](https://github.com/myrta2302) with [#3882](#3882)) - Updated dependencies: - @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] ### 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] <github-actions[bot]@users.noreply.github.com>
To ease the review, the changes are grouped into 3 commits: