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

chore(component): add shadow on optional arrow for post-tooltip component (cherry pick #4441 to v8) #4506

Open
wants to merge 1 commit into
base: release/v8
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/eighty-ghosts-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-components': patch
---

Added shadow to an optional tooltip arrow for `post-popover` component.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,38 @@
// Keeps the little arrow visible
overflow: visible;

&:not(:has(.arrow)) {
@include elevation-mx.elevation('elevation-3');
}

&:has(.arrow) {
filter:
drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15))
drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15))
drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15));
}

&:has(.arrow.top) {
filter:
drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15))
drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15))
drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15));
}

&:has(.arrow.left) {
filter:
drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15))
drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15))
drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15));
}

&:has(.arrow.right) {
filter:
drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15))
drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15))
drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15));
}

.arrow {
$arrow-size: 0.5825rem;
position: absolute;
Expand Down
Loading