phanpy/src/components/modal.css

66 lines
1.5 KiB
CSS
Raw Normal View History

2022-12-10 12:14:48 +03:00
#modal-container > div {
position: fixed;
top: 0;
right: 0;
height: 100%;
width: 100%;
z-index: 1000;
display: flex;
justify-content: center;
align-items: center;
background-color: var(--backdrop-color);
animation: appear 0.5s var(--timing-function) both;
2024-05-24 07:30:20 +03:00
transition: all 0.5s var(--timing-function);
&.solid {
background-color: var(--backdrop-solid-color);
}
2024-05-24 07:30:20 +03:00
--compose-button-dimension: 56px;
--compose-button-dimension-half: calc(var(--compose-button-dimension) / 2);
--compose-button-dimension-margin: 16px;
&.min {
/* Minimized */
pointer-events: none;
user-select: none;
overflow: hidden;
transform: scale(0);
--right: max(
var(--compose-button-dimension-margin),
env(safe-area-inset-right)
);
--bottom: max(
var(--compose-button-dimension-margin),
env(safe-area-inset-bottom)
);
--origin-right: calc(
100% - var(--compose-button-dimension-half) - var(--right)
);
--origin-bottom: calc(
100% - var(--compose-button-dimension-half) - var(--bottom)
);
transform-origin: var(--origin-right) var(--origin-bottom);
}
.sheet {
transition: transform 0.3s var(--timing-function);
2024-05-24 07:30:20 +03:00
transform-origin: 80% 80%;
}
&:has(~ div) .sheet {
transform: scale(0.975);
}
2023-07-18 15:40:10 +03:00
}
2024-05-24 07:30:20 +03:00
@media (max-width: calc(40em - 1px)) {
#app[data-shortcuts-view-mode='tab-menu-bar'] ~ #modal-container > div.min {
border: 2px solid red;
--bottom: calc(
var(--compose-button-dimension-margin) + env(safe-area-inset-bottom) +
52px
);
}
}