This fixes the slide up animation and the end point so that modals are actually visible on mobile. Ones that scroll still don't work great.
211 lines
4.2 KiB
SCSS
211 lines
4.2 KiB
SCSS
.dialog {
|
|
position: fixed;
|
|
box-sizing: border-box;
|
|
background: none;
|
|
border: 0;
|
|
inset: 0;
|
|
display: grid;
|
|
padding: 0;
|
|
place-items: center;
|
|
min-height: 100vh;
|
|
min-width: 100vw;
|
|
overflow-y: auto;
|
|
color: inherit;
|
|
z-index: 10;
|
|
|
|
@include breakpoint(phone) {
|
|
place-items: flex-end;
|
|
}
|
|
|
|
.dialogContent {
|
|
$multiplier: 4;
|
|
|
|
animation: $duration-modal-open cubic-bezier(0.16, 1, 0.3, 1) 0s 1 normal
|
|
none running openModalDesktop;
|
|
background: var(--dialog-bg);
|
|
border-radius: $card-corner;
|
|
box-sizing: border-box;
|
|
border: 0.5px solid rgba(0, 0, 0, 0.18);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $unit * $multiplier;
|
|
height: auto;
|
|
min-width: $unit * 48;
|
|
// min-height: $unit-12x;
|
|
overflow-y: auto;
|
|
// height: 80vh;
|
|
max-height: 60vh; // Having a max-height interferes with SearchModal scrolling
|
|
min-width: 580px;
|
|
max-width: 42vw;
|
|
width: 520px; // Using max/min-width messes with the Edit Party contenteditable div
|
|
// padding: $unit * $multiplier;
|
|
position: relative;
|
|
|
|
a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
@include breakpoint(phone) {
|
|
animation: slideUp;
|
|
animation-duration: 1s;
|
|
animation-fill-mode: forwards;
|
|
animation-play-state: running;
|
|
animation-timing-function: ease-out;
|
|
border-bottom-left-radius: 0;
|
|
border-bottom-right-radius: 0;
|
|
min-width: inherit;
|
|
min-height: inherit;
|
|
transform: initial;
|
|
left: 0;
|
|
right: 0;
|
|
top: $unit-10x;
|
|
height: auto;
|
|
width: 100%;
|
|
}
|
|
|
|
&.search {
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 430px;
|
|
max-height: none;
|
|
padding: 0;
|
|
|
|
@include breakpoint(phone) {
|
|
// animation: none;
|
|
min-width: inherit;
|
|
height: 90vh;
|
|
|
|
.container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
}
|
|
}
|
|
|
|
&.conflict {
|
|
max-height: 80vh;
|
|
}
|
|
|
|
&.editParty {
|
|
min-height: 80vh;
|
|
|
|
.container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-grow: 1;
|
|
}
|
|
}
|
|
|
|
.container {
|
|
overflow-y: hidden;
|
|
|
|
&.scrollable {
|
|
overflow-y: auto;
|
|
}
|
|
}
|
|
|
|
&.Conflict {
|
|
$weapon-diameter: 14rem;
|
|
|
|
.Content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $unit-4x;
|
|
padding: $unit-4x $unit-4x $unit-2x $unit-4x;
|
|
|
|
& > p {
|
|
font-size: $font-regular;
|
|
line-height: 1.4;
|
|
|
|
strong {
|
|
font-weight: $bold;
|
|
}
|
|
|
|
&:lang(ja) {
|
|
line-height: 1.4;
|
|
}
|
|
}
|
|
}
|
|
|
|
.weapon,
|
|
.character {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $unit;
|
|
text-align: center;
|
|
width: $weapon-diameter;
|
|
font-weight: $medium;
|
|
|
|
img {
|
|
border-radius: 1rem;
|
|
width: $weapon-diameter;
|
|
height: auto;
|
|
}
|
|
|
|
span {
|
|
line-height: 1.3;
|
|
}
|
|
}
|
|
|
|
footer {
|
|
display: flex;
|
|
flex-direction: row;
|
|
gap: $unit;
|
|
|
|
.Button {
|
|
font-size: $font-regular;
|
|
padding: ($unit * 1.5) ($unit * 2);
|
|
width: 100%;
|
|
|
|
&.btn-disabled {
|
|
background: $grey-90;
|
|
color: $grey-70;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
&:not(.btn-disabled) {
|
|
background: $grey-90;
|
|
color: $grey-50;
|
|
|
|
&:hover {
|
|
background: $grey-80;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@keyframes openModalDesktop {
|
|
0% {
|
|
opacity: 0;
|
|
transform: scale(0.96);
|
|
}
|
|
|
|
100% {
|
|
// opacity: 1;
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
@keyframes slideUp {
|
|
0% {
|
|
transform: translateY(400px);
|
|
animation-timing-function: ease-out;
|
|
}
|
|
60% {
|
|
transform: translateY(-30px);
|
|
animation-timing-function: ease-in;
|
|
}
|
|
80% {
|
|
transform: translateY(10px);
|
|
animation-timing-function: ease-out;
|
|
}
|
|
100% {
|
|
transform: translateY(0px);
|
|
animation-timing-function: ease-in;
|
|
}
|
|
}
|
|
}
|