@import "../../../../css/static/mixin"; @import "../../../../css/static/properties"; html:root { --modal-content-background: #19191b; --modal-color-blue: #0a73d2; --modal-color-green: #00d400; --modal-color-red: #d50000; } .modalTitle { background-color: #222224; flex-grow: 0; flex-shrink: 0; display: flex; flex-direction: row; justify-content: stretch; padding: .25em; @include user-select(none); .icon, .button { flex-grow: 0; flex-shrink: 0; } .button { height: 1.4em; width: 1.4em; padding: .2em; border-radius: .2em; cursor: pointer; display: flex; -webkit-app-region: no-drag; pointer-events: all; &:hover { background-color: #1b1b1c; } &:not(:last-of-type) { margin-right: .25em; } } .icon { margin-left: .25em; margin-right: .5em; display: flex; flex-direction: column; justify-content: center; img { height: 1.2em; width: 1.2em; margin-bottom: .2em; } } .title, { flex-grow: 1; flex-shrink: 1; color: #9d9d9e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } h5 { margin: 0; padding: 0; } } .modalBody { position: relative; min-width: 10em; min-height: 5em; overflow-y: auto; overflow-x: auto; display: flex; flex-direction: column; /* explicitly set the background color so the next element could use background-color: inherited; */ background: var(--modal-content-background); @include chat-scrollbar(); &.color-blue { border-left: 2px solid var(--modal-color-blue); } &.color-green { border-left: 2px solid var(--modal-color-green); } &.color-red { border-left: 2px solid var(--modal-color-red); } } .modalFrame { background: var(--modal-content-background); border: 1px solid black; border-radius: $border_radius_middle; width: max-content; max-width: 100%; min-width: 20em; min-height: min-content; max-height: 100%; flex-shrink: 1; flex-grow: 0; /* we dont want a grow over the limit set within the content, but we want to shrink the content if necessary */ margin-left: auto; margin-right: auto; overflow: hidden; display: flex; flex-direction: column; justify-content: stretch; &.windowed { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; .modalTitle { -webkit-app-region: drag; } .modalBody { height: 100%; width: 100%; } } } .modalWindowContainer { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; justify-content: stretch; max-height: 100vh; max-width: 100vw; .modalTitle { display: none!important; } .modalBody { position: absolute; top: 0; left: 0; right: 0; bottom: 0; } } .modalPageContainer { color: var(--text); /* base color */ overflow: auto; /* allow scrolling if a modal is too big */ background-color: rgba(0, 0, 0, 0.8); padding-right: 5%; padding-left: 5%; z-index: 100000; position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; opacity: 0; margin-top: -1000vh; $animation_length: .3s; @include transition(opacity $animation_length ease-in, margin-top $animation_length ease-in); &.shown { margin-top: 0; opacity: 1; } &.align-top { justify-content: flex-start; } &.align-center { justify-content: center; } &.align-bottom { justify-content: flex-end; } .dialog { display: block; margin: 1.75rem 0; /* width calculations */ align-items: center; /* height stuff */ max-height: calc(100% - 3.5em); } }