/*********************************************************************************************************************** css/ui-dialog.css Copyright © 2013–2024 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ /* Core styles patches. */ html[data-dialog] body { overflow: hidden; } /* Base styles. */ #ui-overlay { background-color: #000; height: 200%; left: -50%; opacity: 0; position: fixed; top: -50%; transition: visibility 200ms step-end, opacity 200ms ease-in; visibility: hidden; width: 200%; z-index: 100000; } /* #ui-overlay:not(.open) { transition: visibility 200ms step-end, opacity 200ms ease-in; } */ #ui-overlay.open { opacity: 0.8; /* transition: opacity 200ms ease-in; */ transition: visibility 0s; visibility: visible; } /* We do not animate the closing `#ui-dialog` for various reasons. Chief among them is so that the dialog isn't in the middle of its animation when other page updates happen. In particular, the restoration of `overflow` on `body` would cause the still animating dialog to jump around a little if a scrollbar were to pop in. Any dialog action which performs a task which has its own animations—e.g., passage display—or causes the page to reload in addition to closing the dialog could cause display shenanigans. */ #ui-dialog { display: none; margin: 0; max-width: 66em; opacity: 0; padding: 0; position: fixed; top: 50px; z-index: 100100; } #ui-dialog.open { display: block; opacity: 1; transition: opacity 200ms ease-in; } #ui-dialog > * { box-sizing: border-box; } #ui-dialog-titlebar { background-color: #444; min-height: 24px; position: relative; } #ui-dialog-title { font-size: 1.5em; margin: 0; padding: 0.2em 3.5em 0.2em 0.5em; text-align: center; text-transform: uppercase; } #ui-dialog-close { background-color: transparent; border: 1px solid transparent; cursor: pointer; display: block; font-size: 120%; height: 92%; margin: 0; padding: 0; position: absolute; right: 0; top: 0; transition-duration: 200ms; user-select: none; white-space: nowrap; width: 3.6em; /* Font icon styles. */ @mixin sc-icons-properties; } #ui-dialog-close:hover { background-color: #b44; border-color: #d66; } #ui-dialog-body { background-color: #111; border: 1px solid #444; height: calc(100% - 2.1em); /* parent - title(2.1em) */ line-height: 1.5; min-width: 300px; overflow: auto; padding: 1em; text-align: left; } #ui-dialog-body > *:first-child { margin-top: 0; } #ui-dialog-body hr { background-color: #444; } /* Button bar styles. */ #ui-dialog-body ul.buttons { margin: 0; padding: 0; list-style: none; } #ui-dialog-body ul.buttons li { display: inline-block; margin: 0; padding: 0.4em 0.4em 0 0; } #ui-dialog-body ul.buttons > li + li > button { margin-left: 1em; } /* Accessibility styles. */ @media (prefers-reduced-motion: reduce) { #ui-overlay { transition: opacity 0s; } #ui-overlay.open { transition: opacity 0s; } #ui-dialog.open { transition: opacity 0s; } }