Files
fizzy/app/assets/stylesheets/tooltips.css
T
Jorge Manrubia 0278fe6ae4 Revert "Mobile app / Scoped stylesheets" (#1698)
This reverts commit 39c1906e67.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 17:20:18 +01:00

51 lines
1.3 KiB
CSS

@layer components {
[data-controller~="tooltip"] {
--tooltip-delay: 750ms;
--tooltip-duration: 150ms;
.for-screen-reader {
background: var(--color-ink);
border-radius: 0.5ch;
color: var(--color-canvas);
font-size: var(--text-x-small);
font-weight: normal;
inset: -1ch auto auto 50%;
max-inline-size: min(50ch, calc(100vw - (var(--inline-space) * 2)));
opacity: 0;
padding: 0.25ch 1ch;
transition: var(--tooltip-duration) ease-out allow-discrete;
transition-property: opacity;
translate: -50% -100%;
text-overflow: ellipsis;
&.orient-right {
inset-inline: 0 auto;
translate: 0 -100%;
}
&.orient-left {
inset-inline: auto 0;
translate: 0 -100%;
}
}
@media(any-hover: hover) {
&:hover .for-screen-reader {
block-size: auto !important;
clip-path: none !important;
inline-size: auto !important;
opacity: 1;
transform: translate3d(0, 0, 0); /* Fixes Safari overflow rendering bug */
transition-delay: var(--tooltip-delay);
translate: -50% -100%;
z-index: var(--z-tooltip);
&.orient-left,
&.orient-right {
translate: 0 -100%;
}
}
}
}
}