hensei-web/components/common/DialogContent/index.module.scss
Justin Edmund 9dd3260761 Update DialogContent
* Shrunk max-height to 60vh, and remove it for search
* Added an explicit width, as using min/max-width interferes with the contentEditable div in EditPartyModal
* Added custom styles for EditPartyModal
* Removed unused styles
2023-07-02 02:07:55 -07:00

227 lines
4.5 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;
.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: 90vh;
transform: initial;
left: 0;
right: 0;
top: 5vh;
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;
}
}
}
&.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;
}
}
.Diagram {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: flex-start;
&.CharacterDiagram {
align-items: center;
}
ul {
align-items: center;
display: flex;
flex-direction: column;
gap: $unit-2x;
}
.wrapper {
display: flex;
justify-content: center;
width: 100%;
}
.arrow {
align-items: center;
color: $grey-55;
display: flex;
font-size: 4rem;
text-align: center;
height: $weapon-diameter;
justify-content: center;
}
}
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: translate(0%, 100%);
}
100% {
transform: translate(0, 0%);
}
}
}