.#{$ns}modal { padding: 1rem; margin: auto; max-width: 600px; min-width: 250px; width: calc(100% - 2rem); max-height: calc(100vh - 2rem); transform: translate(-50%, -50%); position: fixed; top: 50%; left: 50%; .#{$ns}modal-title { font-weight: 600; font-size: 1.2rem; margin-bottom: 0.5rem; } .#{$ns}modal-content { overflow-y: auto; max-height: calc(100vh - 10rem); // margin: auto; } .#{$ns}modal-action { margin-top: 0.5rem; display: flex; :first-child { margin-left: auto; } button { @extend .#{$ns}btn; } } transform-origin: center; animation: growModalBox 0.2s linear; } @keyframes growModalBox { from { filter: opacity(0); } to { filter: opacity(1); } } .#{$ns}modal-hidden { display: none; }