ant-design/components/modal/style/modal.less

160 lines
3.1 KiB
Plaintext
Raw Normal View History

@dialog-prefix-cls: ~"@{ant-prefix}-modal";
2018-07-31 17:05:07 +08:00
@table-prefix-cls: ~"@{ant-prefix}-table";
2016-05-05 15:03:24 +08:00
.@{dialog-prefix-cls} {
.reset-component;
2016-05-05 15:03:24 +08:00
position: relative;
width: auto;
margin: 0 auto;
top: 100px;
2016-05-18 18:55:50 +08:00
padding-bottom: 24px;
2016-05-05 15:03:24 +08:00
&-wrap {
position: fixed;
overflow: auto;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: @zindex-modal;
-webkit-overflow-scrolling: touch;
outline: 0;
}
&-title {
margin: 0;
2016-11-08 21:07:01 +08:00
font-size: @font-size-lg;
line-height: 22px;
2017-03-07 14:29:02 +08:00
font-weight: 500;
color: @heading-color;
2016-05-05 15:03:24 +08:00
}
&-content {
position: relative;
background-color: @component-background;
2016-05-05 15:03:24 +08:00
border: 0;
border-radius: @border-radius-base;
background-clip: padding-box;
2016-10-14 21:43:59 +08:00
box-shadow: @shadow-2;
2016-05-05 15:03:24 +08:00
}
&-close {
cursor: pointer;
border: 0;
background: transparent;
position: absolute;
2017-04-19 11:13:39 +08:00
right: 0;
top: 0;
2016-05-05 15:03:24 +08:00
z-index: 10;
font-weight: 700;
line-height: 1;
text-decoration: none;
transition: color .3s;
color: @text-color-secondary;
outline: 0;
padding: 0;
2016-05-05 15:03:24 +08:00
&-x {
display: block;
font-style: normal;
vertical-align: baseline;
text-align: center;
text-transform: none;
text-rendering: auto;
width: 56px;
height: 56px;
line-height: 56px;
2016-11-08 21:07:01 +08:00
font-size: @font-size-lg;
2016-05-05 15:03:24 +08:00
}
&:focus,
2016-05-05 15:03:24 +08:00
&:hover {
color: #444;
text-decoration: none;
}
}
&-header {
padding: 16px 24px;
2016-05-05 15:03:24 +08:00
border-radius: @border-radius-base @border-radius-base 0 0;
background: @component-background;
2016-11-08 20:50:59 +08:00
color: @text-color;
border-bottom: @border-width-base @border-style-base @border-color-split;
2016-05-05 15:03:24 +08:00
}
&-body {
padding: 24px;
2016-11-08 20:57:07 +08:00
font-size: @font-size-base;
line-height: @line-height-base;
word-wrap: break-word;
2016-05-05 15:03:24 +08:00
}
&-footer {
border-top: @border-width-base @border-style-base @border-color-split;
padding: 10px 16px;
2016-05-05 15:03:24 +08:00
text-align: right;
border-radius: 0 0 @border-radius-base @border-radius-base;
button + button {
margin-left: 8px;
margin-bottom: 0;
}
}
&.zoom-enter,
&.zoom-appear {
animation-duration: @animation-duration-slow;
2016-05-05 15:03:24 +08:00
transform: none; // reset scale avoid mousePosition bug
opacity: 0;
user-select: none; // https://github.com/ant-design/ant-design/issues/11777
2016-05-05 15:03:24 +08:00
}
&-mask {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
background-color: @modal-mask-bg; // lesshint duplicateProperty: false
2016-05-05 15:03:24 +08:00
height: 100%;
z-index: @zindex-modal-mask;
filter: ~"alpha(opacity=50)";
&-hidden {
display: none;
}
}
2016-05-18 18:55:50 +08:00
&-open {
overflow: hidden;
}
2016-05-05 15:03:24 +08:00
}
2018-07-31 17:05:07 +08:00
.@{dialog-prefix-cls}-centered {
text-align: center;
&:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
width: 0;
}
.@{dialog-prefix-cls} {
display: inline-block;
vertical-align: middle;
top: 0;
text-align: left;
}
}
2018-05-29 03:38:15 +08:00
@media (max-width: @screen-sm-max) {
.@{dialog-prefix-cls} {
width: auto !important;
margin: 10px;
}
2018-07-31 17:05:07 +08:00
.@{dialog-prefix-cls}-centered {
.@{dialog-prefix-cls} {
flex: 1;
}
}
}