@opensig/opendesign
Version:
<p align="center"><img src="../docs/public/opendesign-logo-light.png"/></p> <h1 align="center">opendesign</h1> <p align="center">一个 Vue 3 组件库</p> <p align="center"><b>皮肤可定制,使用 TypeScript</b></p>
307 lines (286 loc) • 6.57 kB
CSS
.o-dialog {
--dlg-close-size: var(--o-icon_size_control-m);
--dlg-close-color: var(--o-color-info2);
--dlg-close-color-hover: var(--o-color-primary2);
--dlg-close-color-active: var(--o-color-primary3);
--dlg-color: var(--o-color-info1);
--dlg-header-color: var(--o-color-info1);
--dlg-bg-color: var(--o-color-control-light);
--dlg-radius: var(--o-radius_control-l);
--dlg-shadow: var(--o-shadow-1);
--dlg-max-height: 100%;
--dlg-min-width: 272px;
--dlg-margin: 24px;
--dlg-edge-gap: 32px;
--dlg-inner-gap: 24px;
--actions-justify: var(--dlg-actions-justify, center);
}
.o-dialog-auto {
--dlg-max-height: 80%;
}
.o-dialog-exlarge {
--dlg-width: 1170px;
--dlg-max-height: 780px;
--dlg-min-height: 520px;
}
.o-dialog-large {
--dlg-width: 930px;
--dlg-max-height: 780px;
--dlg-min-height: 424px;
}
.o-dialog-medium {
--dlg-width: 690px;
--dlg-max-height: 480px;
--dlg-min-height: 328px;
}
.o-dialog-small {
--dlg-width: 450px;
--dlg-max-height: 272px;
--dlg-min-height: 224px;
--dlg-header-gap: 16px;
}
.o-dlg-main {
color: var(--dlg-color);
position: relative;
background-color: var(--dlg-bg-color);
box-shadow: var(--dlg-shadow);
border-radius: var(--dlg-radius);
margin: var(--dlg-margin);
width: var(--dlg-width);
min-width: var(--dlg-min-width);
max-height: var(--dlg-max-height);
min-height: var(--dlg-min-height);
display: flex;
flex-direction: column;
padding: var(--dlg-edge-gap);
}
.o-dlg-btn-close {
position: absolute;
right: 8px;
top: 8px;
font-size: var(--dlg-close-size);
color: var(--dlg-close-color);
display: flex;
transition: transform var(--o-easing-standard) var(--o-duration-m2);
cursor: pointer;
z-index: 1;
}
.o-dlg-btn-close {
overflow: hidden;
}
.o-dlg-btn-close svg {
transition: all var(--o-duration-m1) var(--o-easing-standard-in);
}
@media (hover: hover) {
.o-dlg-btn-close:hover svg {
transform: rotate(180deg);
}
}
@media (hover: hover) {
.o-dlg-btn-close:hover {
color: var(--dlg-close-color-hover);
}
}
.o-dlg-btn-close:active {
color: var(--dlg-close-color-active);
transform: scale(0.9);
}
.o-dlg-header {
color: var(--dlg-header-color);
text-align: center;
font-size: var(--o-font_size-h2);
line-height: var(--o-line_height-h2);
font-weight: 500;
border-top-left-radius: inherit;
border-top-right-radius: inherit;
overflow: hidden;
flex-shrink: 0;
margin-bottom: var(--dlg-header-gap, var(--dlg-inner-gap));
}
.o-dlg-body {
flex: 1;
display: flex;
overflow: visible;
min-height: 0;
}
.o-dlg-body > .o-scrollbar {
--scrollbar-y-right: calc(-1 * var(--dlg-edge-gap));
}
.o-dlg-body-content {
flex: 1;
}
.o-dlg-footer {
overflow: hidden;
flex-shrink: 0;
margin-top: var(--dlg-inner-gap);
}
.o-dlg-actions {
display: flex;
align-items: center;
justify-content: var(--actions-justify);
}
.o-dlg-btn + .o-dlg-btn {
margin-left: 16px;
}
@media (min-width: 601px) {
.o-dialog-responsive {
--layer-origin: center;
}
}
@media (max-width: 1200px) {
.o-dialog-responsive {
--layer-position: fixed;
}
.o-dialog-responsive .o-dlg-btn + .o-dlg-btn.o-btn-text {
position: relative;
}
.o-dialog-responsive .o-dlg-btn + .o-dlg-btn.o-btn-text::before {
content: "";
border-left: 1px solid var(--o-color-control1-light);
position: absolute;
height: 24px;
left: -8px;
}
}
@media (max-width: 600px) {
.o-dialog-responsive {
--layer-align: flex-end;
--layer-origin: center bottom;
--dlg-min-width: none;
}
.o-dialog-responsive .o-dlg-btn {
flex: 1;
}
.o-dialog-responsive .o-dlg-btn-close {
display: none;
}
}
@media (min-width: 1201px) and (max-width: 1440px) {
.o-dialog {
--dlg-edge-gap: 24px;
--dlg-inner-gap: 16px;
}
}
@media (min-width: 841px) and (max-width: 1200px) {
.o-dialog {
--dlg-edge-gap: 24px;
--dlg-inner-gap: 16px;
}
}
@media (max-width: 840px) {
.o-dialog {
--dlg-edge-gap: 16px;
--dlg-inner-gap: 12px;
}
}
@media (min-width: 1201px) and (max-width: 1440px) {
.o-dlg-header {
font-size: var(--o-font_size-h4);
line-height: var(--o-line_height-h4);
}
}
@media (max-width: 1200px) {
.o-dlg-header {
font-size: var(--o-font_size-text2);
line-height: var(--o-line_height-text2);
}
}
@media (min-width: 1201px) and (max-width: 1440px) {
.o-dialog-exlarge {
--dlg-width: 80%;
--dlg-max-height: 80%;
--dlg-min-height: 65%;
}
}
@media (max-width: 1200px) {
.o-dialog-exlarge {
--dlg-width: 100%;
--dlg-max-height: 100%;
--dlg-radius: 0;
--dlg-margin: 0;
--dlg-edge-gap: 24px;
--dlg-inner-gap: 16px;
}
}
@media (min-width: 1201px) and (max-width: 1440px) {
.o-dialog-large {
--dlg-width: 65%;
--dlg-max-height: 80%;
--dlg-min-height: 50%;
}
}
@media (max-width: 1200px) {
.o-dialog-large {
--dlg-width: 100%;
--dlg-max-height: 100%;
--dlg-radius: 0;
--dlg-margin: 0;
--dlg-edge-gap: 24px;
--dlg-inner-gap: 16px;
}
}
@media (min-width: 1201px) and (max-width: 1440px) {
.o-dialog-medium {
--dlg-width: 50%;
--dlg-max-height: 80%;
--dlg-min-height: 35%;
}
}
@media (min-width: 841px) and (max-width: 1200px) {
.o-dialog-medium {
--dlg-width: 65%;
--dlg-max-height: 80%;
--dlg-min-height: 128px;
--dlg-margin: 24px;
}
}
@media (max-width: 840px) {
.o-dialog-medium {
--dlg-width: calc(100vw - 48px);
--dlg-max-height: 65%;
--dlg-min-height: 128px;
--dlg-margin: 24px;
}
}
@media (min-width: 1201px) and (max-width: 1440px) {
.o-dialog-small {
--dlg-width: 35%;
--dlg-max-height: 50%;
--dlg-min-height: 20%;
}
}
@media (max-width: 1200px) {
.o-dialog-small {
--dlg-min-height: 128px;
--dlg-max-height: 80%;
--dlg-margin: 24px;
--dlg-edge-gap: 16px;
--dlg-inner-gap: 12px;
--dlg-header-gap: 12px;
}
}
@media (min-width: 841px) and (max-width: 1200px) {
.o-dialog-small {
--dlg-width: 50%;
}
}
@media (min-width: 601px) and (max-width: 840px) {
.o-dialog-small {
--dlg-width: 65%;
}
}
@media (max-width: 600px) {
.o-dialog-small {
--dlg-width: calc(100vw - 48px);
--dlg-max-height: 65%;
}
}
@media (max-width: 600px) {
.o-dialog-phone-half-full {
--dlg-width: 100%;
--dlg-margin: 0;
}
.o-dialog-phone-half-full.o-dialog-auto, .o-dialog-phone-half-full.o-dialog-small, .o-dialog-phone-half-full.o-dialog-medium {
--dlg-radius: var(--o-radius_control-l) var(--o-radius_control-l) 0 0;
}
}