Mailspring/internal_packages/attachments/stylesheets/attachments.less
Evan Morikawa 6fcd5f2ced feat(attachments): new attachments & uploads UI with img support
Summary:
Initial styles on attachments ui

More file uploading UI

fix race condition in draft saving

attachments and uploads interweaved

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1610
2015-06-11 12:04:52 -07:00

161 lines
3 KiB
Plaintext

@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;
&.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;
}
.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: 0px;
height: 2px;
width: 0; // Changed by React
z-index: 3;
display: block;
background: @progress-bar-fill;
}
.attachment-bar-bg {
position: absolute;
left: 0;
bottom: 0px;
height: 2px;
width: 100%;
z-index: 2;
display: block;
background: @progress-bar-background;
}
}
.image-attachment-file-wrap, .image-file-upload {
position: relative;
margin: @spacing-standard 0;
text-align: center;
.attachment-download-progress,
.attachment-upload-progress {
bottom: -2px;
}
.attachment-bar-bg {
bottom: -2px;
}
&:hover {
.attachment-file-actions {
display: block;
}
}
.attachment-file-actions {
display: none;
}
.attachment-icon {
position: absolute;
z-index: 2;
right: 0;
top: 0;
background: @white;
width: 26px;
border-radius: 0 0 0 3px;
}
.attachment-preview img {
position: relative;
z-index: 1;
max-width: 100%;
}
}