mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 12:40:08 +08:00
19d97e5393
Summary: fix(attachment): Bad filenames breaking icons fix developer bar colors fix critical bug with files Render small attachments inline-block, without hover effect, and with nice dotted transparency background Test Plan: No new tests Reviewers: evan Reviewed By: evan Differential Revision: https://phab.nylas.com/D1661
209 lines
4.1 KiB
Text
209 lines
4.1 KiB
Text
@import "ui-variables";
|
|
@import "ui-mixins";
|
|
|
|
.attachment-file-wrap {
|
|
cursor: default;
|
|
display: inline-block;
|
|
position: relative;
|
|
font-size: @font-size-small;
|
|
margin-bottom: @spacing-standard;
|
|
margin-right: @spacing-standard;
|
|
background: @background-off-primary;
|
|
box-shadow: inset 0 0 1px 1px rgba(0,0,0,0.09);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
width: calc(~"50% - 7.5px");
|
|
border-radius: 4px;
|
|
|
|
&.non-image-attachment {
|
|
width: calc(~"50% - 23px");
|
|
margin-left: 15px;
|
|
&:nth-child(even) {
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
|
|
&.file-upload {
|
|
border-radius: 4px;
|
|
padding: 13px @spacing-standard 13px @spacing-standard;
|
|
.attachment-file-name {
|
|
color: @text-color-very-subtle;
|
|
.uploading {
|
|
color: @text-color;
|
|
}
|
|
}
|
|
}
|
|
|
|
.attachment-inner-wrap {
|
|
border-radius: 4px;
|
|
padding: 13px @spacing-standard 13px @spacing-standard;
|
|
position: relative;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
&:nth-child(even) {
|
|
margin-right: 0;
|
|
}
|
|
&:hover {
|
|
cursor: default;
|
|
}
|
|
|
|
&.pending, &.started, &.progress, &.downloading {
|
|
}
|
|
|
|
.attachment-file-icon {
|
|
margin-right: 7px;
|
|
}
|
|
|
|
.attachment-file-name {
|
|
font-weight: @font-weight-medium;
|
|
}
|
|
margin-left: 15px;
|
|
.attachment-file-and-name {
|
|
position: relative;
|
|
z-index: 2;
|
|
}
|
|
|
|
.attachment-file-actions {
|
|
position: relative;
|
|
z-index: 3;
|
|
.attachment-icon {
|
|
float: right;
|
|
position: relative;
|
|
top: 2px;
|
|
margin-left: 10px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.image-file-upload,
|
|
.image-attachment-file-wrap,
|
|
.attachment-file-wrap,
|
|
.attachment-inner-wrap {
|
|
|
|
.attachment-download-bar-wrap {
|
|
display: none;
|
|
}
|
|
|
|
&.downloading, &.started, &.progress {
|
|
.attachment-download-bar-wrap {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
&.completed, &.success {
|
|
.attachment-download-bar-wrap {
|
|
display: block;
|
|
}
|
|
.attachment-upload-progress { background: @background-color-success; }
|
|
}
|
|
|
|
&.aborted, &.failed {
|
|
.attachment-download-bar-wrap {
|
|
display: block;
|
|
}
|
|
.attachment-upload-progress { background: @background-color-error; }
|
|
}
|
|
|
|
.attachment-download-progress,
|
|
.attachment-upload-progress {
|
|
position: absolute;
|
|
left: 0;
|
|
bottom: 0;
|
|
height: 2px;
|
|
width: 0; // Changed by React
|
|
z-index: 3;
|
|
display: block;
|
|
background: @progress-bar-fill;
|
|
}
|
|
.attachment-bar-bg {
|
|
position: absolute;
|
|
left: 0;
|
|
bottom: 0;
|
|
height: 2px;
|
|
width: 100%;
|
|
z-index: 2;
|
|
display: block;
|
|
background: @progress-bar-background;
|
|
}
|
|
}
|
|
|
|
.image-attachment-file-wrap,
|
|
.image-file-upload {
|
|
|
|
position: relative;
|
|
text-align: center;
|
|
display:inline-block;
|
|
vertical-align: top;
|
|
margin-bottom: @spacing-standard;
|
|
margin-right: @spacing-standard;
|
|
|
|
.attachment-download-progress,
|
|
.attachment-upload-progress {
|
|
bottom: -2px;
|
|
}
|
|
.attachment-bar-bg {
|
|
bottom: -2px;
|
|
}
|
|
|
|
.attachment-file-actions {
|
|
position: relative;
|
|
z-index: 2;
|
|
}
|
|
|
|
&:hover {
|
|
.attachment-file-actions, .attachment-name-container, .attachment-name {
|
|
display: block;
|
|
}
|
|
}
|
|
.attachment-file-actions, .attachment-name-container, .attachment-name {
|
|
display: none;
|
|
}
|
|
|
|
.attachment-icon {
|
|
position: absolute;
|
|
z-index: 2;
|
|
right: -8px;
|
|
top: -8px;
|
|
width: 26px;
|
|
border-radius: 0 0 0 3px;
|
|
}
|
|
|
|
.attachment-preview {
|
|
position: relative;
|
|
z-index: 1;
|
|
overflow: hidden;
|
|
|
|
.attachment-name-container {
|
|
position: absolute;
|
|
bottom: 0;
|
|
top: 0;
|
|
z-index: 2;
|
|
width: 100%;
|
|
height:100%;
|
|
min-height:300px;
|
|
background: linear-gradient(to top, rgba(0,0,0,0.75) 0%,rgba(0,0,0,0) 23%);
|
|
vertical-align:bottom;
|
|
|
|
.attachment-name {
|
|
color: @white;
|
|
left: @spacing-standard;
|
|
bottom: @spacing-standard;
|
|
position: absolute;
|
|
z-index: 3;
|
|
}
|
|
}
|
|
|
|
img {
|
|
position: relative;
|
|
z-index: 1;
|
|
max-width: 100%;
|
|
background: url(../static/images/attachments/transparency-background.png) top left repeat;
|
|
background-size:8px;
|
|
}
|
|
}
|
|
|
|
}
|