phanpy/src/components/shortcuts.css

47 lines
1.2 KiB
CSS
Raw Normal View History

2023-02-16 12:51:54 +03:00
#shortcuts-button {
position: fixed;
bottom: 16px;
bottom: max(16px, env(safe-area-inset-bottom));
left: 16px;
left: max(16px, env(safe-area-inset-left));
padding: 16px;
background-color: var(--bg-faded-blur-color);
z-index: 101;
transition: all 0.3s ease-in-out;
2023-02-17 14:31:28 +03:00
border: var(--hairline-width) solid var(--bg-color);
box-shadow: inset 0 -4px 16px -8px var(--button-bg-blur-color),
0 3px 8px -1px var(--drop-shadow-color);
2023-02-16 12:51:54 +03:00
}
#shortcuts-button .icon {
transform: translateY(2px); /* Balance the icon's vertical alignment */
}
#app:has(header[hidden]) #shortcuts-button,
#shortcuts-button[hidden] {
transform: translateY(200%);
pointer-events: none;
user-select: none;
}
#shortcuts-button:is(:hover, :focus) {
2023-02-18 19:08:37 +03:00
background-color: var(--bg-color);
2023-02-16 12:51:54 +03:00
filter: none;
}
#shortcuts-button:active {
2023-02-17 14:31:28 +03:00
transform: scale(0.95);
transition: none;
2023-02-16 12:51:54 +03:00
}
@media (min-width: calc(40em + 56px + 8px)) {
#shortcuts-button {
right: 16px;
right: max(16px, env(safe-area-inset-right));
left: auto;
top: 16px;
top: max(16px, env(safe-area-inset-top));
bottom: auto;
}
#app:has(header[hidden]) #shortcuts-button,
#shortcuts-button[hidden] {
transform: translateY(-200%);
}
2023-02-16 12:51:54 +03:00
}