keeweb/app/styles/areas/_details.scss

543 lines
13 KiB
SCSS
Raw Normal View History

2015-10-17 23:49:24 +02:00
.details {
@include display(flex);
@include align-items(stretch);
@include flex-direction(column);
@include justify-content(flex-start);
@include user-select(text);
width: 100%;
2015-10-26 22:07:19 +01:00
&__back-button {
display: none;
@include mobile {
display: block;
padding-bottom: $base-padding-v;
cursor: pointer;
2016-02-02 17:32:48 +01:00
line-height: $mobile-back-button-height;
height: $mobile-back-button-height;
2015-10-27 20:07:19 +01:00
>i { margin-right: $base-padding-h; }
2015-10-26 22:07:19 +01:00
}
}
2015-10-17 23:49:24 +02:00
&__header {
@include display(flex);
padding-bottom: $small-spacing;
overflow: visible;
min-height: 40px;
&-title {
@include user-select(text);
@include flex(1);
2015-10-26 22:07:19 +01:00
@include align-self(flex-start);
2015-10-17 23:49:24 +02:00
cursor: text;
margin: 0 6px;
padding: 3px 6px 1px;
overflow: hidden;
text-overflow: ellipsis;
border-radius: $base-border-radius;
border: 1px solid transparent;
position: relative;
top: -2px;
&:hover {
transition: border-color $base-duration $base-timing;
@include th {
border: 1px solid light-border-color();
}
}
}
input.details__header-title-input {
@include user-select(text);
@include flex(1);
margin: 0 6px;
padding: 0 6px;
font-size: $large-header-font-size;
font-weight: bold;
position: relative;
top: -2px;
}
&-color, &-icon {
@include user-select(none);
@include area-selectable();
display: inline;
font-size: $large-header-font-size;
height: 1em;
padding-top: .1em;
}
&-icon {
width: 1.4em;
text-align: center;
2015-11-21 21:14:21 +01:00
&--icon {
background-position: center center;
background-size: 28px 28px;
background-repeat: no-repeat;
}
2015-10-17 23:49:24 +02:00
}
}
&__colors-popup {
@include user-select(none);
display: none;
position: absolute;
z-index: $z-index-no-modal;
border-radius: $base-border-radius;
@include th {
background: background-color();
box-shadow: 0 0 3px background-color();
}
top: 13px;
left: 6px;
font-size: $large-header-font-size;
&:hover, .details__header-color:hover & {
display: block;
}
&-item {
padding: 8px 12px;
cursor: pointer;
display: block;
position: relative;
&--active {
&:before {
content: $fa-var-bookmark;
}
}
&:hover {
&:after {
content: $fa-var-bookmark;
opacity: .3;
position: absolute;
left: 12px;
top: 8px;
}
}
}
}
&__body {
@include flex(1);
@include display(flex);
@include align-items(stretch);
@include flex-direction(column);
@include justify-content(flex-start);
@include flex-wrap(wrap);
@include scrollbar-on-hover;
position: relative;
overflow: hidden;
.details--drag & { display: none; }
>.scroller {
@include flex(1);
@include display(flex);
@include align-items(stretch);
2016-04-23 17:19:48 +02:00
@include align-content(flex-start);
2015-10-17 23:49:24 +02:00
@include flex-direction(row);
@include justify-content(flex-start);
@include flex-wrap(wrap);
overflow-x: hidden;
padding-top: 3px;
2016-01-14 19:33:59 +01:00
@media screen and (-webkit-min-device-pixel-ratio:0) { width: 100% !important; }
2015-10-17 23:49:24 +02:00
}
&-fields {
2016-01-14 19:33:59 +01:00
@include flex(1 0 50%);
min-width: 0;
2015-10-17 23:49:24 +02:00
}
&-aside {
@include flex(0 0 auto);
@include display(flex);
@include align-items(stretch);
@include flex-direction(column);
@include justify-content(flex-start);
}
2016-04-23 17:19:48 +02:00
&-after {
@include flex(100% 1 0);
}
2015-10-17 23:49:24 +02:00
}
&__field {
$details-field-line-height: 18px;
@include display(flex);
@include align-items(stretch);
@include flex-direction(row);
@include justify-content(flex-start);
margin-bottom: .5em;
&-label {
@include th { color: muted-color(); }
@include user-select(text);
width: 7em;
text-align: right;
cursor: pointer;
padding-right: 1em;
border: 1px solid transparent;
line-height: $details-field-line-height;
&:hover {
@include th { color: medium-color(); }
}
.details__field--can-edit-title & {
cursor: text;
}
>input {
margin: 0;
padding: 0 $base-padding-h;
line-height: $details-field-line-height;
height: $details-field-line-height;
2015-10-21 22:17:53 +02:00
width: 100%;
2015-10-17 23:49:24 +02:00
@include th { color: text-color(); }
2017-02-05 15:05:45 +01:00
.chrome & { padding-bottom: 1px; } // TODO: find a better cross-browser way to do it
2015-10-17 23:49:24 +02:00
}
}
&-value {
@include flex(1);
@include user-select(text);
@include align-self(flex-start);
2015-10-20 21:58:07 +02:00
position: relative;
2015-10-17 23:49:24 +02:00
cursor: text;
padding: 0 $base-padding-h;
border: 1px solid transparent;
min-height: $details-field-line-height;
box-sizing: border-box;
line-height: $details-field-line-height;
2016-01-14 19:33:59 +01:00
overflow: hidden;
text-overflow: ellipsis;
2016-01-31 15:25:01 +01:00
margin-right: 20px;
2016-03-05 09:35:22 +01:00
&-add-label {
color: transparent;
}
2015-10-17 23:49:24 +02:00
.details__field--editable & {
border-radius: $base-border-radius;
&:hover {
transition: border-color $base-duration $base-timing;
2016-06-05 16:49:00 +02:00
border: 1px solid;
2015-10-17 23:49:24 +02:00
@include th {
2016-06-05 16:49:00 +02:00
border-color: light-border-color();
2015-10-17 23:49:24 +02:00
box-shadow: 0 0 3px form-box-shadow-color();
}
2016-03-05 09:35:22 +01:00
.details__field-value-add-label {
@include th { color: muted-color(); }
transition: color $base-duration $base-timing;
}
2015-10-17 23:49:24 +02:00
}
}
.details__field--protect & {
@include user-select(none);
}
2015-10-17 23:49:24 +02:00
.details__field--multiline & {
width: 0;
white-space: pre-wrap;
}
.details__field--edit &,
.details__field--edit.details__field--editable &,
.details__field--edit.details__field--editable:hover & {
border: 0 solid transparent;
padding: 0;
}
>input, >textarea {
margin: 0;
padding: 0 $base-padding-h;
line-height: $details-field-line-height;
2015-10-21 22:17:53 +02:00
width: 100%;
2015-10-17 23:49:24 +02:00
height: 20px;
2016-01-17 13:23:07 +01:00
.details__field--protected & { font-family: $monospace-font-family; }
2015-10-17 23:49:24 +02:00
}
2017-02-05 15:05:45 +01:00
>input {
.chrome & { padding-bottom: 1px; } // TODO: find a better cross-browser way to do it
}
2015-10-17 23:49:24 +02:00
>textarea {
display: block;
resize: none;
line-height: 1.5em;
overflow: hidden;
}
2016-04-23 16:50:40 +02:00
>label {
font-weight: normal;
@include user-select(none);
}
2015-10-17 23:49:24 +02:00
.details__body-aside & {
@include th { color: muted-color(); }
a { @include th { color: muted-color(); } }
2016-02-16 22:01:37 +01:00
width: 13em;
padding-right: 0;
margin-right: 0;
2015-10-17 23:49:24 +02:00
@include flex(0 0 auto);
}
2015-11-08 19:24:37 +01:00
&-btn {
2015-10-20 21:58:07 +02:00
@include position(absolute, 0 0 null null);
@include th { color: muted-color(); }
cursor: pointer;
&:hover {
@include th { color: medium-color(); }
}
&:before {
@include position(absolute, 0 0 null null);
@include fa-icon();
cursor: pointer;
2016-03-05 14:59:36 +01:00
padding: .3em $base-padding-h;
2015-10-20 21:58:07 +02:00
}
}
2015-11-08 19:24:37 +01:00
&-btn-gen:before { content: $fa-var-bolt; }
&-btn-protect {
&:before { content: $fa-var-unlock; }
2016-01-17 13:23:07 +01:00
.details__field--protected & { &:before { content: $fa-var-lock; } }
2015-11-08 19:24:37 +01:00
}
2016-06-05 16:49:00 +02:00
&--select {
border-width: 0;
padding: 0;
.details__field--editable:hover & { border-width: 0; }
}
>select {
margin: 0;
width: 100%;
padding: 0 $base-padding-h;
}
2015-10-17 23:49:24 +02:00
}
2016-03-05 10:10:38 +01:00
&--no-select {
.details__field-label, .details__field-value {
@include user-select(none);
}
}
2015-10-17 23:49:24 +02:00
}
&__attachments {
@include flex(1);
@include display(flex);
@include align-items(stretch);
@include flex-direction(row);
@include justify-content(flex-end);
@include flex-wrap(nowrap);
@include user-select(none);
overflow: hidden;
white-space: nowrap;
.details--drag & { display: none; }
}
&__attachment {
@include user-select(none);
@include area-selectable();
@include align-self(flex-end);
@include flex(0 1 auto);
@include th { border: light-border(); }
margin-right: $small-spacing;
padding: $base-padding;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
i { margin-right: .4em; }
&--active {
@include th { border-bottom: 1px solid action-color(); };
}
}
&__attachment-add {
@include user-select(none);
@include align-self(flex-end);
@include flex(0 0 auto);
@include th { color: muted-color(); }
border: 1px solid transparent;
margin-right: $small-spacing;
padding: $base-padding;
text-align: center;
overflow: hidden;
transition: color $base-duration $base-timing;
&:hover {
@include th { color: medium-color(); }
}
&-title {
display: none;
transition: color $slow-transition-out;
margin-right: $base-padding-h;
2015-10-17 23:49:24 +02:00
color: transparent;
.details__attachment-add:hover & {
display: inline;
transition: color $slow-transition-in;
@include th { color: muted-color(); }
}
}
}
&__attachment-preview {
margin-right: $base-padding-h;
width: 100%;
&-data {
> image {
width: 100%;
}
> pre {
white-space: pre-wrap;
}
}
&-download-text {
@include user-select(none);
position: absolute;
bottom: $base-padding-v;
right: $base-padding-h;
white-space: nowrap;
opacity: .15;
2015-10-29 22:13:15 +01:00
display: none;
@include nomobile { display: block; }
2015-10-17 23:49:24 +02:00
}
&-icon {
display: none;
}
&--empty {
@include display(flex);
@include flex-direction(column);
@include flex(1 0 auto);
@include justify-content(center);
@include align-self(center);
@include align-items(center);
text-align: center;
.details__attachment-preview-icon {
display: block;
font-size: 10em;
}
.details__attachment-preview-download-text {
position: static;
margin-top: 2em;
opacity: 1;
}
}
}
&__buttons {
@include display(flex);
@include align-items(stretch);
@include flex-direction(row);
2016-02-04 20:41:44 +01:00
@include flex-shrink(0);
2015-10-17 23:49:24 +02:00
@include justify-content(flex-start);
margin-top: $base-padding-v;
.details--drag & { display: none; }
2015-11-09 19:15:39 +01:00
&-trash, &-trash-del {
2015-10-17 23:49:24 +02:00
@include icon-btn($error:true);
@include align-self(flex-end);
margin-right: 10px;
}
2015-11-09 19:15:39 +01:00
&-trash-del {
@include th { color: muted-color(); }
}
2015-10-17 23:49:24 +02:00
button ~ button {
margin-left: $small-spacing;
}
}
&__history {
@include flex(1 0 auto);
@include display(flex);
@include align-items(stretch);
@include flex-direction(column);
@include justify-content(flex-start);
margin-right: $base-padding-h;
&-top {
@include display(flex);
@include align-items(stretch);
@include flex-direction(row);
@include justify-content(flex-start);
}
&-desc {
@include user-select(none);
}
&-timeline {
@include flex(1 0 auto);
position: relative;
height: 44px;
margin-left: 5px;
&-axis {
width: 100%;
position: absolute;
top: 9px;
@include th { border-bottom: light-border(); }
}
&-item {
position: absolute;
top: 4px;
cursor: pointer;
transform: translateX(-48%);
&:hover {
@include th { color: mix(action-color(), text-color(), 50%); }
}
&--active, &--active:hover {
z-index: $z-index-no-modal;
cursor: default;
@include th { color: action-color(); }
}
}
&-label {
position: absolute;
top: 16px;
white-space: nowrap;
transform: translateX(-50%);
@include th { color: muted-color(); }
}
}
&-arrow-prev, &-arrow-next {
@include transform(scaleX(2));
@include transform-origin(left top);
cursor: pointer;
position: absolute;
top: 30px;
font-size: 14px;
&:hover { @include th { color: mix(action-color(), text-color(), 50%); } }
}
&-arrow-prev {
left: -5px;
}
&-arrow-next {
right: 5px;
}
&-close {
margin-left: 20px;
}
&-body {
@include flex(1 1 auto);
}
&-buttons {
@include user-select(none);
@include align-self(flex-end);
margin-bottom: $base-padding-v;
}
}
&__dropzone {
display: none;
.details--drag & {
@include display(flex);
@include flex-direction(column);
@include flex(1 0 auto);
@include justify-content(center);
@include align-self(center);
@include align-items(center);
text-align: center;
}
&-icon {
font-size: 10em;
}
&-header {
margin-top: 1em;
}
}
2015-10-18 17:43:16 +02:00
2016-02-28 12:16:05 +01:00
&__field-autocomplete {
2015-10-18 17:43:16 +02:00
position: absolute;
2016-04-15 21:21:49 +02:00
overflow: hidden;
2016-01-17 21:02:49 +01:00
@include common-dropdown;
2016-02-28 12:16:05 +01:00
&-item {
2015-10-18 17:43:16 +02:00
padding: $base-padding;
display: inline-block;
2016-04-15 21:21:49 +02:00
word-break: break-all;
2015-10-18 17:43:16 +02:00
@include area-selectable(bottom);
&--selected {
@include th {
background-color: secondary-background-color();
border-bottom: selected-hover-border();
}
}
2015-10-18 17:43:16 +02:00
}
}
2015-10-17 23:49:24 +02:00
}