SillyTavern/public/css/popup.css

121 lines
3.0 KiB
CSS

dialog {
color: var(--SmartThemeBodyColor);
}
/* Closed state of the dialog */
.popup {
width: 500px;
text-align: center;
box-shadow: 0px 0px 14px var(--black70a);
border: 1px solid var(--SmartThemeBorderColor);
padding: 4px 14px;
background-color: var(--SmartThemeBlurTintColor);
border-radius: 10px;
display: flex;
flex-direction: column;
/* Overflow visible so elements (like toasts) can appear outside of the dialog. '.popup_content' is hiding overflow for the real content. */
overflow: visible;
/* Fix weird animation issue with font-scaling during popup open */
backface-visibility: hidden;
transform: translateZ(0);
-webkit-font-smoothing: subpixel-antialiased;
}
.popup .popup_content {
display: flex;
flex-direction: column;
overflow: hidden;
width: 100%;
height: 100%;
}
.popup .popup_text {
margin-top: 10px;
padding: 0 8px;
overflow: hidden;
flex-grow: 1;
}
.popup .popup_text h3:first-child {
/* No double spacing for the first heading needed, the .popup_text already has margin */
margin-top: 0px;
}
.popup.vertical_scrolling_dialogue_popup .popup_text {
overflow-y: auto;
}
.popup.horizontal_scrolling_dialogue_popup .popup_text {
overflow-x: auto;
}
/* Open state of the dialog */
.popup[open] {
animation: pop-in var(--animation-duration-slow) ease-in-out;
}
.popup[closing] {
animation: pop-out var(--animation-duration-slow) ease-in-out;
}
.popup[open]::backdrop {
animation: fade-in var(--animation-duration-slow) ease-in-out;
backdrop-filter: blur(calc(var(--SmartThemeBlurStrength) * 2));
-webkit-backdrop-filter: blur(calc(var(--SmartThemeBlurStrength) * 2));
background-color: var(--black30a);
}
.popup[closing]::backdrop {
animation: fade-out var(--animation-duration-slow) ease-in-out;
}
.popup.dragover {
filter: brightness(1.1) saturate(1.1);
outline: 3px dashed var(--SmartThemeBorderColor);
}
/* Fix toastr in dialogs by actually placing it at the top of the screen via transform */
.popup #toast-container {
height: 100svh;
top: calc(50% + var(--topBarBlockSize));
left: 50%;
transform: translate(-50%, -50%);
}
.popup_input {
margin-top: 10px;
}
.popup_controls {
margin-top: 10px;
display: flex;
align-self: center;
gap: 20px;
}
.menu_button.menu_button_default {
box-shadow: 0 0 5px var(--white20a);
}
.menu_button.popup_ok {
background-color: var(--crimson70a);
cursor: pointer;
}
.menu_button.popup_ok:hover {
background-color: var(--crimson-hover);
}
.menu_button.menu_button_custom {
/** Custom buttons should not scale to smallest size, otherwise they will always break to multiline */
width: unset;
}
dialog.popup .menu_button:focus,
dialog input[type='checkbox']:not(#nav-toggle):not(#rm_button_panel_pin):not(#lm_button_panel_pin):not(#WI_panel_pin):focus {
/** For dialogs, mimic the outline of keyboard navigation for all button focus */
outline: 1px solid white;
}