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

fix(styles): Color-contrast on post-tabs with dark background #2753

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

imagoiq
Copy link
Contributor

@imagoiq imagoiq commented Mar 5, 2024

  1. Fixed color-contrast of post-tabs on dark-background:

From
Cypress_3Nn8pl3IFf

To
Screenshot 2024-03-05 at 08-33-23 snapshots--tabs

  1. Added cursor pointer to tabs title
  2. Revert change from https://github.com/swisspost/design-system/pull/2349/files/344934ab280122c643d2886666f3981829ff2ff1#r1413888274 and fix with added spacing. The margin is visible here:

image

Note: @rouvenpost @Cian77 I didn't implement what's in the design https://www.figma.com/file/xZ0IW0MJO0vnFicmrHiKaY/Components-Post?type=design&node-id=70-18&mode=design&t=VxSxr2DejdjVc4mY-0 because it misses how it should look like on dark colored background and because we are quite limited at the moment with this post-tabs component as the :host-context selector is not available (and will never be it seems) on all browsers, so to adapt to a particular theme given by the parent, we can only use CSS custom properties (like --post-contrast-color-inverted or --post-contrast-color). That means the component doesn't know anything about the current theme. This is good if we want to go further on theme architecture where you only need to provide different variables to change a component, but we are not there yet. And finally, it is also complex to style for the post-tabs component as well for the tabs HTML component, perhaps we should decouple those two.

@imagoiq imagoiq self-assigned this Mar 5, 2024
@imagoiq imagoiq requested a review from a team as a code owner March 5, 2024 07:40
@imagoiq imagoiq requested a review from alizedebray March 5, 2024 07:40
Copy link

changeset-bot bot commented Mar 5, 2024

🦋 Changeset detected

Latest commit: 5d80c36

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

This PR includes changesets to release 11 packages
Name Type
@swisspost/design-system-styles Patch
@swisspost/design-system-components-angular-workspace Patch
@swisspost/design-system-components Patch
@swisspost/design-system-demo Patch
@swisspost/design-system-documentation Patch
@swisspost/internet-header Patch
@swisspost/design-system-intranet-header-workspace Patch
@swisspost/design-system-nextjs-integration Patch
@swisspost/design-system-intranet-header Patch
@swisspost/design-system-components-react Patch
@swisspost/design-system-components-angular Patch

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 Mar 5, 2024

Preview environment ready: https://preview-2753--swisspost-web-frontend.netlify.app
Preview environment ready: https://preview-2753--swisspost-design-system-next.netlify.app

Copy link

sonarcloud bot commented Mar 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@imagoiq imagoiq linked an issue Mar 5, 2024 that may be closed by this pull request
@imagoiq imagoiq merged commit cf8ca92 into main Mar 5, 2024
9 checks passed
@imagoiq imagoiq deleted the fix/2684-post-tabs-contrast-dark-bg branch March 5, 2024 14:11
alizedebray pushed a commit that referenced this pull request Mar 5, 2024
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.


# Releases
## @swisspost/design-system-components@2.1.0

### Minor Changes

- Added a new rating web-component. (by
[@davidritter-dotcom](https://github.com/davidritter-dotcom) with
[#2411](#2411))

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@6.6.4

## @swisspost/design-system-icons@1.4.0

### Minor Changes

- Added icons number 2576, 2577 and 2578. (by
[@swisspost-bot](https://github.com/swisspost-bot) with
[#2747](#2747))

## @swisspost/design-system-components-angular@2.0.0

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-components@2.1.0

## @swisspost/internet-header@1.13.8

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@6.6.4

## @swisspost/design-system-intranet-header@5.0.11

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@6.6.4

## @swisspost/design-system-migrations@1.0.2

### Patch Changes

- Fixed paths to the migration entry point. (by
[@alizedebray](https://github.com/alizedebray) with
[#2757](#2757))

## @swisspost/design-system-styles@6.6.4

### Patch Changes

- Fixed color-contrast on post-tabs with dark background. (by
[@imagoiq](https://github.com/imagoiq) with
[#2753](#2753))

## @swisspost/design-system-components-angular-workspace@1.0.4

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-components@2.1.0
    -   @swisspost/design-system-styles@6.6.4

## @swisspost/design-system-components-react@1.0.30

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-components@2.1.0

## @swisspost/design-system-demo@7.2.4

### Patch Changes

- Fixed broken links. (by [@alizedebray](https://github.com/alizedebray)
with [#2756](#2756))
-   Updated dependencies:
    -   @swisspost/design-system-styles@6.6.4
    -   @swisspost/design-system-intranet-header@5.0.11

## @swisspost/design-system-documentation@4.0.0

### Patch Changes

- Moved versions.json (used for version switcher) from archive to
current documentation. (by [@imagoiq](https://github.com/imagoiq) with
[#2748](#2748))

- Fixed broken links. (by [@alizedebray](https://github.com/alizedebray)
with [#2756](#2756))

-   Updated dependencies:
    -   @swisspost/design-system-icons@1.4.0
    -   @swisspost/design-system-components@2.1.0
    -   @swisspost/design-system-styles@6.6.4
    -   @swisspost/design-system-components-angular@2.0.0
    -   @swisspost/design-system-components-react@1.0.30
    -   @swisspost/internet-header@1.13.8
    -   @swisspost/design-system-intranet-header@5.0.11

## @swisspost/design-system-intranet-header-workspace@3.0.11

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@6.6.4

## @swisspost/design-system-nextjs-integration@0.1.3

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@6.6.4
    -   @swisspost/design-system-components-react@1.0.30
    -   @swisspost/internet-header@1.13.8

Co-authored-by: github-actions[bot] <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.

A11y – Check color-contrast on post-tabs with dark background
3 participants