phanpy/src/components/shortcuts.css

46 lines
1.1 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;
box-shadow: 0 3px 8px -1px var(--drop-shadow-color);
transition: all 0.3s ease-in-out;
2023-02-17 14:31:28 +03:00
border: var(--hairline-width) solid var(--bg-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) {
background-color: var(--button-color);
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
}