Chatwoot/app/javascript/dashboard/assets/scss/widgets/_conversation-card.scss

156 lines
3.1 KiB
SCSS
Raw Normal View History

@keyframes left-shift-animation {
0%,
100% {
transform: translateX(0);
}
50% {
transform: translateX(1px);
}
}
.conversation {
@include flex;
@include flex-shrink;
@include padding(0 0 0 $space-normal);
border-bottom: 1px solid transparent;
border-left: $space-micro solid transparent;
border-top: 1px solid transparent;
cursor: pointer;
position: relative;
&.active {
animation: left-shift-animation .25s $swift-ease-out-function;
background: $color-background;
border-bottom-color: $color-border-light;
border-left-color: $color-woot;
border-top-color: $color-border-light;
.conversation--details {
border-top-color: transparent;
}
+.conversation .conversation--details {
border-top-color: transparent;
}
}
&:first-child {
.conversation--details {
border-top-color: transparent;
}
}
&:last-child {
.conversation--details {
border-bottom-color: $color-border-light;
}
}
.conversation--details {
@include margin(0 0 0 $space-one);
@include border-light-bottom;
@include border-light-top;
@include padding($space-slab 0);
border-bottom-color: transparent;
}
2019-10-27 13:58:02 +00:00
.conversation--user {
font-size: $font-size-small;
margin-bottom: 0;
text-transform: capitalize;
.label {
left: $space-micro;
max-width: $space-jumbo;
overflow: hidden;
position: relative;
text-overflow: ellipsis;
top: $space-micro;
white-space: nowrap;
}
}
.conversation--message {
color: $color-body;
font-size: $font-size-small;
font-weight: $font-weight-normal;
height: $space-medium;
line-height: $space-medium;
margin: 0;
max-width: 96%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 27rem;
2020-03-22 06:14:40 +00:00
.small-icon {
font-size: $font-size-mini;
vertical-align: top;
}
.message-from-agent {
color: $color-gray;
font-size: $font-size-mini;
}
}
2019-10-27 13:58:02 +00:00
.conversation--meta {
@include flex;
flex-direction: column;
position: absolute;
right: $space-normal;
top: $space-normal;
.unread {
$unread-size: $space-normal;
@include round-corner;
@include light-shadow;
background: darken($success-color, 3%);
color: $color-white;
display: none;
font-size: $font-size-micro;
font-weight: $font-weight-black;
height: $unread-size;
line-height: $unread-size;
margin-left: auto;
margin-top: $space-smaller;
min-width: $unread-size;
padding: 0 $space-smaller;
text-align: center;
}
2019-10-27 13:58:02 +00:00
.timestamp {
color: $dark-gray;
font-size: $font-size-micro;
font-weight: $font-weight-normal;
line-height: $space-normal;
margin-left: auto;
}
}
&.unread-chat {
.unread {
display: inline-block;
}
2019-10-27 13:58:02 +00:00
.conversation--message {
font-weight: $font-weight-bold;
}
2019-10-27 13:58:02 +00:00
.conversation--user {
font-weight: $font-weight-bold;
}
}
&.compact {
padding-left: 0;
.conversation--details {
margin-left: 0;
}
}
}