Skip to content
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(colors)!: prefix all color variables with --post- #361

Merged
merged 17 commits into from
Aug 22, 2022

Conversation

gfellerph
Copy link
Member

This changes is an overhaul of colors and how they are presented to the developer. Colors defined by the Post now have the prefix --post, variables defined by bootstrap have the prefix --bs. The code has been generally updated to use post variables wherever variables were used already. Many components don't use variables and have yet to be migrated.

The idea of contrast colors is, that they always provide the best contrast on their current background - provided the bg-* classes were used to set said background.

This changes is an overhaul of colors and how they are presented to the developer. Colors defined by the Post now have the prefix --post, variables defined by bootstrap have the prefix --bs. The code has been generally updated to use post variables wherever variables were used already. Many components don't use variables and have yet to be migrated.

The idea of contrast colors is, that they always provide the best contrast on their current background - provided the bg-* classes were used to set said background.
@gfellerph gfellerph linked an issue Aug 19, 2022 that may be closed by this pull request
@changeset-bot
Copy link

changeset-bot bot commented Aug 19, 2022

🦋 Changeset detected

Latest commit: 5ee031b

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

This PR includes changesets to release 1 package
Name Type
@swisspost/design-system-styles 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

@github-actions
Copy link
Contributor

🚀 Preview environment ready: https://preview-361--swisspost-web-frontend.netlify.app

@gfellerph gfellerph changed the title 358 add post prefix to all css variables feat(colors)!: prefix all color variables with --post- Aug 19, 2022
@gfellerph gfellerph changed the title feat(colors)!: prefix all color variables with --post- feat(colors)!: prefix all color variables with --post- Aug 19, 2022
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.

I'm done for now, but I will check again if you replaced a fulltone gray with a white/block opaque value. Because meybe I missed one in the beginning...

packages/styles/src/components/subnavigation.scss Outdated Show resolved Hide resolved
packages/styles/src/placeholders/_color.scss Outdated Show resolved Hide resolved
packages/styles/src/placeholders/_color.scss Outdated Show resolved Hide resolved
packages/styles/src/placeholders/_color.scss Show resolved Hide resolved
packages/styles/src/themes/bootstrap/_overrides-color.scss Outdated Show resolved Hide resolved
packages/styles/tests/cwf.test.scss Show resolved Hide resolved
packages/styles/tests/post-intranet.test.scss Show resolved Hide resolved
packages/styles/src/components/badge.scss Outdated Show resolved Hide resolved
packages/styles/src/components/progress.scss Outdated Show resolved Hide resolved
packages/styles/src/placeholders/_color.scss Outdated Show resolved Hide resolved
packages/styles/src/placeholders/_color.scss Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Aug 22, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@gfellerph gfellerph merged commit 2b52044 into main Aug 22, 2022
@gfellerph gfellerph deleted the 358-add-post-prefix-to-all-css-variables-1 branch August 22, 2022 09:19
@gfellerph gfellerph linked an issue Aug 22, 2022 that may be closed by this pull request
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.

Add "post" prefix to all css variables Color variables are defined two times
2 participants