1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00
vault-frontend/src/containers/dialogs/ScrollDialog/styles.module.scss
2020-11-06 13:05:43 +07:00

212 lines
3.3 KiB
SCSS

@import "src/styles/variables";
.container {
height: 100vh;
width: 100%;
align-items: center;
justify-content: center;
display: flex;
position: relative;
}
.overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.content {
display: flex;
align-items: center;
justify-content: center;
position: relative;
padding: 40px 0 0 0;
box-sizing: border-box;
flex: 1 1 800px;
z-index: 1;
&:global(.has_title) {
padding-top: 60px + 10px; // +15px
}
&:global(.has_buttons) {
padding-bottom: 60px + 10px; // +15px
}
}
.top,
.bottom {
width: 100%;
height: 60px;
position: absolute;
top: 15px;
bottom: auto;
left: 0;
display: flex;
align-items: center;
justify-content: center;
padding: 0 20px;
box-sizing: border-box;
z-index: 11;
}
.top {
height: 40px;
top: 0;
&:global(.has_buttons) {
height: 60px;
top: 15px;
}
.wrap {
display: flex;
align-items: flex-end;
}
}
.bottom {
bottom: 10px;
top: auto;
.pan {
border-radius: 0 0 $radius $radius;
box-shadow: transparentize($color: black, $amount: 0.8) 0 8px 0;
}
}
.wrap {
flex: 0 1 800px;
height: 100%;
position: relative;
}
.scroll_wrap {
flex: 0 1 840px;
height: 100%;
}
.content_wrap {
padding: 0 20px;
margin-top: -$radius;
}
.top_sticky {
position: absolute;
top: 100%;
left: 0;
width: 100%;
padding-top: $gap * 2;
margin-top: -$gap;
z-index: -1;
background: transparentize(white, 0.1);
border-radius: $radius;
box-shadow: transparentize(black, 0.9) 0 15px 15px;
}
.pan {
background: darken($content_bg, 4%);
max-height: 60px;
}
.children {
background: $content_bg;
border-radius: $radius $radius 0 0;
}
.top_cap {
height: $radius;
background: $content_bg;
border-radius: $radius $radius 0 0;
flex: 1;
position: relative;
box-shadow: inset transparentize(white, 0.95) 0 1px;
&::after {
position: absolute;
content: ' ';
width: 100%;
height: $radius;
background: linear-gradient($content_bg, transparentize($content_bg, 1));
bottom: -$gap;
}
}
.error {
background: linear-gradient(transparentize($orange, 1), $red 90%);
position: absolute;
width: 100%;
height: auto;
bottom: 100%;
left: 0;
padding: $gap * 2 $gap;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font: $font_14_regular;
border-radius: 0 0 $radius $radius;
pointer-events: none;
touch-action: none;
opacity: 0;
transition: opacity 0.25s;
&:global(.active) {
opacity: 1;
}
}
@keyframes spin_1 {
0% {
transform: rotate(0);
}
100% {
transform: rotate(45deg);
}
}
@keyframes spin_2 {
0% {
transform: rotate(0);
}
100% {
transform: rotate(-45deg);
}
}
.close {
width: 32px;
height: 32px;
position: absolute;
bottom: 20px;
left: 50%;
transform: translate(-50%, 0);
cursor: pointer;
opacity: 0.5;
transition: opacity 0.5s, transform 0.25s;
&:hover {
opacity: 1;
transform: translate(-50%, -4px);
}
&::before,
&::after {
content: ' ';
width: 32px;
height: 2px;
background: white;
position: absolute;
top: 50%;
left: 0;
animation: spin_1 0.5s forwards;
}
&::before {
animation: spin_2 0.5s forwards;
}
}