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): fixed HCM hover and focus styles for post-avatar component in anchor and button contexts #4338

Conversation

alionazherdetska
Copy link
Contributor

No description provided.

Copy link

changeset-bot bot commented Dec 18, 2024

🦋 Changeset detected

Latest commit: 7c89104

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

This PR includes changesets to release 16 packages
Name Type
@swisspost/design-system-styles Patch
@swisspost/design-system-components-angular-workspace Patch
@swisspost/design-system-components 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-styles-primeng-workspace Patch
@swisspost/design-system-intranet-header Patch
@swisspost/design-system-styles-primeng Patch
@swisspost/design-system-components-react Patch
@swisspost/design-system-components-angular Patch
@swisspost/design-system-intranet-header-showcase Patch
@swisspost/design-system-tokens Patch
@swisspost/design-system-icons Patch
@swisspost/design-system-migrations 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 Dec 18, 2024

Related Previews

Copy link
Contributor

@alizedebray alizedebray left a comment

Choose a reason for hiding this comment

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

Can you also update the border-color of the avatar when it is interactive?
Since there is only 1 to 2 characters, the difference in the text color is not very visible.

Copy link
Contributor

@alizedebray alizedebray left a comment

Choose a reason for hiding this comment

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

Please keep the default HCM colors as much as possible:

  • when in an anchor, the avatar has a LinkText color and border-color automatically set, it does not have to change color on hover
  • when in a button, the avatar has a ButtonText color and border-color changing to HighlightText on hover, also automatically set


&::after {
background-color: tokens.get('avatar-image-hover-opacity');
}
}
}

@include utilities.focus-style;
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Co-authored-by: Alizé Debray <33580481+alizedebray@users.noreply.github.com>
@alionazherdetska alionazherdetska merged commit ca71081 into main Jan 31, 2025
10 checks passed
@alionazherdetska alionazherdetska deleted the 4294-bug-hcm-fix-hover-and-focus-color-for-post-avatar-in-anchor-and-button-contexts branch January 31, 2025 19:34
gfellerph pushed a commit that referenced this pull request Feb 4, 2025
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/design-system-styles@9.0.0-next.14

### Major Changes

- Removed the `.lh-base` utility class. (by
[@leagrdv](https://github.com/leagrdv) with
[#4360](#4360))

- Removed Bootstrap shadow utility classes from the Design System, as
the elevation classes are replacing them. (by
[@leagrdv](https://github.com/leagrdv) with
[#4361](#4361))

- Renamed elevation utility classes and SCSS variables to allow for more
variants in the future. (by [@leagrdv](https://github.com/leagrdv) with
[#4361](#4361))

### Minor Changes

- Removed `post-popovercontainer` from the `post-megadropdown` component
and added desktop animations with new slide-down and slide-up effects.
(by [@alionazherdetska](https://github.com/alionazherdetska) with
[#4421](#4421))

- Removed deprecated `$displayX-weight` scss variables and font-weight
light (`.light`) utilities as the new Swiss Post font does not have a
300 weight version. (by [@leagrdv](https://github.com/leagrdv) with
[#4531](#4531))

### Patch Changes

- Made the following components hidden until fully loaded to prevent
flickering: `post-avatar`, `post-banner`, `post-breadcrumb`,
`post-breadcrumb-item`, `post-closebutton`, `post-collapsible-trigger`,
`post-footer`, `post-header`, `post-language-option`,
`post-language-switch`, `post-mainnavigation`, `post-megadropdown`,
`post-megadropdown-trigger`, `post-menu`, `post-menu-item`, and
`post-menu-trigger`. (by [@schaertim](https://github.com/schaertim) with
[#4544](#4544))

- Fixed z-indexes for header components to ensure proper stacking order.
(by [@alionazherdetska](https://github.com/alionazherdetska) with
[#4421](#4421))

- Updated the styles for `.focus-ring` and added documentation. (by
[@alionazherdetska](https://github.com/alionazherdetska) with
[#4543](#4543))

- Fixed high contrast mode hover and focus styles for `post-avatar`
component in anchor and button contexts. (by
[@alionazherdetska](https://github.com/alionazherdetska) with
[#4338](#4338))

- Internalized Bootstrap text utilities into the Design System. (by
[@leagrdv](https://github.com/leagrdv) with
[#4360](#4360))

## @swisspost/design-system-components@9.0.0-next.14

### Minor Changes

- Improved main navigation overflow display. (by
[@alizedebray](https://github.com/alizedebray) with
[#4273](#4273))

- Removed `post-popovercontainer` from the `post-megadropdown` component
and added desktop animations with new slide-down and slide-up effects.
(by [@alionazherdetska](https://github.com/alionazherdetska) with
[#4421](#4421))

- Added the `post-linkarea` component. (by
[@veyaromain](https://github.com/veyaromain) with
[#4030](#4030))

### Patch Changes

- Removed nav for `post-header` component causing blank space on scroll
for screens &lt;1025px. (by
[@alionazherdetska](https://github.com/alionazherdetska) with
[#4532](#4532))

- Added z-index to the `post-header` component to display it on top of
other contents. (by [@leagrdv](https://github.com/leagrdv) with
[#4367](#4367))

- Fixed header mobile menu behavior by trapping the focus within it when
opened as well as making it scrollable. (by
[@leagrdv](https://github.com/leagrdv) with
[#4395](#4395))

-   Updated dependencies:
    -   @swisspost/design-system-styles@9.0.0-next.14
    -   @swisspost/design-system-icons@9.0.0-next.14

## @swisspost/design-system-components-angular@9.0.0-next.14

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-components@9.0.0-next.14

## @swisspost/design-system-components-react@9.0.0-next.14

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-components@9.0.0-next.14

## @swisspost/design-system-intranet-header@9.0.0-next.14

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@9.0.0-next.14

## @swisspost/design-system-styles-primeng@9.0.0-next.14

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@9.0.0-next.14

## @swisspost/design-system-tokens@9.0.0-next.14

### Patch Changes

- Added a transform function to avoid unitless zero values for specific
token types (like `dimension`, etc.), which allows us to use these
tokens also in css `calc()` functions. Because `<number-token>`s are
always interpreted as `<number>`s or `<integer>`s, "unitless 0"
`<length>`s aren’t supported in calc().
Source: <https://drafts.csswg.org/css-values-3/#calc-type-checking> (by
[@oliverschuerch](https://github.com/oliverschuerch) with
[#4534](#4534))

## @swisspost/design-system-icons@9.0.0-next.14



## @swisspost/design-system-migrations@9.0.0-next.14



## @swisspost/design-system-documentation@6.0.0-next.15

### Major Changes

- Removed Bootstrap shadow utility classes from the Design System, as
the elevation classes are replacing them. (by
[@leagrdv](https://github.com/leagrdv) with
[#4361](#4361))

- Renamed elevation utility classes and SCSS variables to allow for more
variants in the future. (by [@leagrdv](https://github.com/leagrdv) with
[#4361](#4361))

### Minor Changes

- Removed deprecated `$displayX-weight` scss variables and font-weight
light (`.light`) utilities as the new Swiss Post font does not have a
300 weight version. (by [@leagrdv](https://github.com/leagrdv) with
[#4531](#4531))

- Updated the styles for `.focus-ring` and added documentation. (by
[@alionazherdetska](https://github.com/alionazherdetska) with
[#4543](#4543))

- Added the `post-linkarea` component. (by
[@veyaromain](https://github.com/veyaromain) with
[#4030](#4030))

- Added duplicate icons in icons health report. (by
[@myrta2302](https://github.com/myrta2302) with
[#4528](#4528))

### Patch Changes

- Fixed the sizing of the technology and supported browser images on the
introduction page of the documentation. (by
[@schaertim](https://github.com/schaertim) with
[#4549](#4549))

- Internalized Bootstrap text utilities into the Design System. (by
[@leagrdv](https://github.com/leagrdv) with
[#4360](#4360))

- Added fake content on the header preview to show the sticky behaviour.
(by [@leagrdv](https://github.com/leagrdv) with
[#4367](#4367))

-   Updated dependencies:
    -   @swisspost/design-system-styles@9.0.0-next.14
    -   @swisspost/design-system-components@9.0.0-next.14
    -   @swisspost/design-system-tokens@9.0.0-next.14
    -   @swisspost/internet-header@2.0.0-next.14
    -   @swisspost/design-system-components-react@9.0.0-next.14
    -   @swisspost/design-system-icons@9.0.0-next.14

## @swisspost/design-system-components-angular-workspace@1.1.10-next.14

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@9.0.0-next.14
    -   @swisspost/design-system-components@9.0.0-next.14

## @swisspost/internet-header@2.0.0-next.14

### Patch Changes

- Replaced `sessionData` and `address` properties in the sessionStorage
item `klp.widget.state`. If you're looking for this info, contact the
Swiss Post Design System Team! (by
[@oliverschuerch](https://github.com/oliverschuerch) with
[#4553](#4553))
-   Updated dependencies:
    -   @swisspost/design-system-styles@9.0.0-next.14

## @swisspost/design-system-intranet-header-workspace@3.0.22-next.14

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@9.0.0-next.14

## @swisspost/design-system-intranet-header-showcase@1.0.10-next.14

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-intranet-header@9.0.0-next.14

## @swisspost/design-system-nextjs-integration@0.1.14-next.14

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@9.0.0-next.14
    -   @swisspost/internet-header@2.0.0-next.14
    -   @swisspost/design-system-components-react@9.0.0-next.14

## @swisspost/design-system-styles-primeng-workspace@1.0.6-next.14

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@9.0.0-next.14

---------

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.

[bug] HCM: Fix hover and focus color for post-avatar in anchor and button contexts
3 participants