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 #4441

Merged
merged 7 commits into from
Jan 23, 2025
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 @@ -41,6 +41,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) {
alionazherdetska marked this conversation as resolved.
Show resolved Hide resolved
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