ant-design/style/components/upload.less

156 lines
2.9 KiB
Plaintext
Raw Normal View History

2015-08-20 16:55:42 +08:00
@upload-prefix-cls: ant-upload;
2015-08-08 23:37:35 +08:00
2015-08-20 16:55:42 +08:00
.@{upload-prefix-cls} {
> span {
display: block;
width: 100%;
}
input[type=file] {
cursor: pointer;
}
&.@{upload-prefix-cls}-select {
display: inline-block;
}
2015-08-20 16:55:42 +08:00
&.@{upload-prefix-cls}-drag {
2015-08-08 23:37:35 +08:00
border: 1px dashed #d9d9d9;
transition: all 0.3s ease;
cursor: pointer;
2015-08-08 23:37:35 +08:00
border-radius: @border-radius-base;
text-align: center;
width: 100%;
2015-10-31 13:27:58 +08:00
height: 180px;
position: relative;
> span {
display: table;
2015-10-31 13:27:58 +08:00
height: 100%;
}
2015-08-20 16:55:42 +08:00
.@{upload-prefix-cls}-drag-container {
display: table-cell;
vertical-align: middle;
}
&:hover {
border: 1px dashed #999;
}
2015-10-31 13:27:58 +08:00
&.@{upload-prefix-cls}-drag-uploading {
2015-11-01 20:44:17 +08:00
border-color: tint(@primary-color, 30%);
2015-10-31 13:27:58 +08:00
}
2015-08-20 16:55:42 +08:00
p.@{upload-prefix-cls}-drag-icon {
2015-08-08 23:37:35 +08:00
.anticon {
font-size: 80px;
margin-top: -30px;
color: tint(@primary-color, 20%);
2015-08-08 23:37:35 +08:00
}
height: 60px;
margin-bottom: 24px;
2015-08-08 23:37:35 +08:00
}
2015-08-20 16:55:42 +08:00
p.@{upload-prefix-cls}-text {
2015-08-08 23:37:35 +08:00
font-size: 14px;
}
2015-08-20 16:55:42 +08:00
p.@{upload-prefix-cls}-hint {
2015-08-08 23:37:35 +08:00
font-size: 12px;
color: #999;
2015-08-08 23:37:35 +08:00
}
.anticon-plus {
2015-08-08 23:37:35 +08:00
font-size: 30px;
transition: all 0.3s ease;
color: #d9d9d9;
&:hover {
color: #999;
}
2015-08-08 23:37:35 +08:00
}
&:hover .anticon-plus {
color: #999;
2015-08-08 23:37:35 +08:00
}
}
}
2015-08-08 23:37:35 +08:00
2015-08-20 16:55:42 +08:00
.@{upload-prefix-cls}-list {
margin-left: 4px;
2015-08-21 17:12:42 +08:00
overflow: hidden;
2015-08-20 16:55:42 +08:00
.@{upload-prefix-cls}-list-item {
overflow: hidden;
2015-10-31 13:27:58 +08:00
margin-top: 8px;
color: #999;
:hover {
2015-11-01 20:44:17 +08:00
background-color: tint(@primary-color, 80%);
2015-10-31 13:27:58 +08:00
.anticon.anticon-cross {
display: inline-block;
}
}
&.@{upload-prefix-cls}-list-item-uploading {
color: #BCBCBC;
}
.@{upload-prefix-cls}-list-item-info {
.anticon-paper-clip {
margin-left: 4px;
font-size: 12px;
}
.anticon-cross {
display: none;
cursor: pointer;
2015-10-31 13:27:58 +08:00
float: right;
margin-right: 8px;
color: #999;
&:hover {
color: #666;
}
}
2015-08-08 23:37:35 +08:00
}
2015-10-31 13:27:58 +08:00
.@{upload-prefix-cls}-list-item-progress {
padding: 0 8px 0 20px;
margin-top: -2px;
margin-bottom: 1px;
font-size: 12px;
.ant-progress-line-inner {
vertical-align: middle;
}
}
2015-08-08 23:37:35 +08:00
}
2015-08-20 16:55:42 +08:00
.@{upload-prefix-cls}-item-name {
font-size: 12px;
margin-left: 4px;
margin-right: 8px;
font-weight: normal;
}
b.@{upload-prefix-cls}-item-name {
color: #666;
}
2015-08-20 16:55:42 +08:00
.@{upload-prefix-cls}-success-icon {
color: @success-color;
font-weight: bold;
}
2015-08-21 17:12:42 +08:00
2015-08-21 17:37:54 +08:00
.@{upload-prefix-cls}-margin-top-enter {
2015-08-24 12:27:13 +08:00
animation: uploadMarginTopIn .3s @ease-in-out-circ;
2015-08-21 17:37:54 +08:00
}
.@{upload-prefix-cls}-margin-top-leave {
2015-08-24 12:27:13 +08:00
animation: uploadMarginTopOut .3s @ease-in-out-circ;
2015-08-21 17:12:42 +08:00
}
2015-08-24 12:27:13 +08:00
@keyframes uploadMarginTopIn {
2015-08-21 17:37:54 +08:00
from {
margin-top: -25px;
opacity: 0;
}
}
2015-08-24 12:27:13 +08:00
@keyframes uploadMarginTopOut {
2015-08-21 17:37:54 +08:00
to {
margin-top: -25px;
opacity: 0;
}
2015-08-21 17:12:42 +08:00
}
}