_direct-chat.scss 3.1 KB
Newer Older
Viral Solani's avatar
Viral Solani committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
/*
 * Component: Direct Chat
 * ----------------------
 */
.direct-chat {
  .box-body {
    @include border-bottom-radius(0);
    position: relative;
    overflow-x: hidden;
    padding: 0;
  }
  &.chat-pane-open {
    .direct-chat-contacts {
      @include translate(0, 0);
    }
  }
}
.direct-chat-messages {
  @include translate(0, 0);
  padding: 10px;
  height: 250px;
  overflow: auto;
}
.direct-chat-msg,
.direct-chat-text {
  display: block;
}
.direct-chat-msg {
  @include clearfix;
  margin-bottom: 10px;
}
.direct-chat-messages,
.direct-chat-contacts {
  @include transition-transform(.5s ease-in-out);
}
.direct-chat-text {
  @include border-radius-same(5px);
  position: relative;
  padding: 5px 10px;
  background: $direct-chat-default-msg-bg;
  border: 1px solid $direct-chat-default-msg-border-color;
  margin: 5px 0 0 50px;
  color: $direct-chat-default-font-color;

  //Create the arrow
  &:after,
    &:before {
    position: absolute;
    right: 100%;
    top: 15px;
    border: solid transparent;
    border-right-color: $direct-chat-default-msg-border-color;
    content: ' ';
    height: 0;
    width: 0;
    pointer-events: none;
  }

  &:after {
    border-width: 5px;
    margin-top: -5px;
  }
  &:before {
    border-width: 6px;
    margin-top: -6px;
  }
  .right & {
    margin-right: 50px;
    margin-left: 0;
    &:after,
      &:before {
      right: auto;
      left: 100%;
      border-right-color: transparent;
      border-left-color: $direct-chat-default-msg-border-color;
    }
  }
}
.direct-chat-img {
  @include border-radius-same(50%);
  float: left;
  width: 40px;
  height: 40px;
  .right & {
    float: right;
  }
}
.direct-chat-info {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}
.direct-chat-name {
  font-weight: 600;
}
.direct-chat-timestamp {
  color: #999;
}
//Direct chat contacts pane
.direct-chat-contacts-open {
  .direct-chat-contacts {
    @include translate(0, 0);
  }
}
.direct-chat-contacts {
  @include translate(101%, 0);
  position: absolute;
  top: 0;
  bottom: 0;
  height: 250px;
  width: 100%;
  background: #222d32;
  color: #fff;
  overflow: auto;
}

//Contacts list -- for displaying contacts in direct chat contacts pane
.contacts-list {
  @extend .list-unstyled;
  > li {
    @include clearfix;
    border-bottom: 1px solid rgba(0,0,0,0.2);
    padding: 10px;
    margin: 0;
    &:last-of-type {
      border-bottom: none;
    }
  }
}
.contacts-list-img {
  @include border-radius-same(50%);
  width: 40px;
  float: left;
}
.contacts-list-info {
  margin-left: 45px;
  color: #fff;
}
.contacts-list-name,
.contacts-list-status {
  display: block;
}
.contacts-list-name {
  font-weight: 600;
}
.contacts-list-status {
  font-size: 12px;
}
.contacts-list-date {
  color: #aaa;
  font-weight: normal;
}
.contacts-list-msg {
  color: #999;
}

//Direct Chat Variants
.direct-chat-danger {
  @include direct-chat-variant($red);
}
.direct-chat-primary {
  @include direct-chat-variant($light-blue);
}
.direct-chat-warning {
  @include direct-chat-variant($yellow);
}
.direct-chat-info {
  @include direct-chat-variant($aqua);
}
.direct-chat-success {
  @include direct-chat-variant($green);
}