tutu/src/platform/StackedRouter.css

69 lines
1.3 KiB
CSS
Raw Normal View History

2024-11-16 20:04:55 +08:00
.StackedPage {
2024-11-23 16:10:48 +08:00
contain: strict;
container: StackedPage / inline-size;
width: 100vw;
width: 100dvw;
height: 100vh;
height: 100dvh;
2024-11-16 20:04:55 +08:00
}
dialog.StackedPage {
border: none;
position: fixed;
padding: 0;
overscroll-behavior: none;
width: 560px;
2024-11-23 21:22:23 +08:00
max-width: 100vw;
max-width: 100dvw;
2024-11-16 20:04:55 +08:00
max-height: 100vh;
max-height: 100dvh;
/*
* WebKit does not see contain-instric-size as the real element size.
* If the container does not have height, the child element using 100%
* height (usually Scafflod in our case) was have 0px computed height.
*
* This behaviour is different from Firefox. So we need to actually
* define the box height here. (Rubicon)
*/
height: 100vh;
height: 100dvh;
2024-11-16 20:04:55 +08:00
background: none;
display: none;
contain: strict;
2024-11-23 21:22:23 +08:00
contain-intrinsic-size: 560px 100vh;
contain-intrinsic-size: 560px 100dvh;
2024-11-16 20:04:55 +08:00
content-visibility: auto;
2024-11-16 22:37:05 +08:00
background: var(--tutu-color-surface);
2024-11-16 20:04:55 +08:00
box-shadow: var(--tutu-shadow-e16);
2024-11-17 17:37:42 +08:00
margin-left: auto;
margin-right: auto;
2024-11-16 20:04:55 +08:00
@media (max-width: 560px) {
& {
margin: 0;
2024-11-16 20:04:55 +08:00
width: 100vw;
width: 100dvw;
contain-intrinsic-size: 100vw 100vh;
contain-intrinsic-size: 100dvw 100dvh;
}
}
&[open] {
2024-11-23 21:22:23 +08:00
display: block;
2024-11-16 20:04:55 +08:00
}
&::backdrop {
background: none;
}
2024-11-17 17:37:42 +08:00
&.animating {
overflow: hidden;
* {
overflow: hidden;
}
}
2024-11-16 20:04:55 +08:00
}