_direct-chat.scss 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. //
  2. // Component: Direct Chat
  3. //
  4. .direct-chat {
  5. .card-body {
  6. overflow-x: hidden;
  7. padding: 0;
  8. position: relative;
  9. }
  10. &.chat-pane-open {
  11. .direct-chat-contacts {
  12. @include translate(0, 0);
  13. }
  14. }
  15. }
  16. .direct-chat-messages {
  17. @include translate(0, 0);
  18. height: 250px;
  19. overflow: auto;
  20. padding: 10px;
  21. }
  22. .direct-chat-msg,
  23. .direct-chat-text {
  24. display: block;
  25. }
  26. .direct-chat-msg {
  27. @include clearfix;
  28. margin-bottom: 10px;
  29. }
  30. .direct-chat-messages,
  31. .direct-chat-contacts {
  32. transition: transform .5s ease-in-out;
  33. }
  34. .direct-chat-text {
  35. @if $enable-rounded {
  36. @include border-radius($border-radius-lg);
  37. }
  38. background: $direct-chat-default-msg-bg;
  39. border: 1px solid $direct-chat-default-msg-border-color;
  40. color: $direct-chat-default-font-color;
  41. margin: 5px 0 0 50px;
  42. padding: 5px 10px;
  43. position: relative;
  44. //Create the arrow
  45. &::after,
  46. &::before {
  47. border: solid transparent;
  48. border-right-color: $direct-chat-default-msg-border-color;
  49. content: ' ';
  50. height: 0;
  51. pointer-events: none;
  52. position: absolute;
  53. right: 100%;
  54. top: 15px;
  55. width: 0;
  56. }
  57. &::after {
  58. border-width: 5px;
  59. margin-top: -5px;
  60. }
  61. &::before {
  62. border-width: 6px;
  63. margin-top: -6px;
  64. }
  65. .right & {
  66. margin-left: 0;
  67. margin-right: 50px;
  68. &::after,
  69. &::before {
  70. border-left-color: $direct-chat-default-msg-border-color;
  71. border-right-color: transparent;
  72. left: 100%;
  73. right: auto;
  74. }
  75. }
  76. }
  77. .direct-chat-img {
  78. @include border-radius(50%);
  79. float: left;
  80. height: 40px;
  81. width: 40px;
  82. .right & {
  83. float: right;
  84. }
  85. }
  86. .direct-chat-infos {
  87. display: block;
  88. font-size: $font-size-sm;
  89. margin-bottom: 2px;
  90. }
  91. .direct-chat-name {
  92. font-weight: 600;
  93. }
  94. .direct-chat-timestamp {
  95. color: darken($gray-500, 25%);
  96. }
  97. //Direct chat contacts pane
  98. .direct-chat-contacts-open {
  99. .direct-chat-contacts {
  100. @include translate(0, 0);
  101. }
  102. }
  103. .direct-chat-contacts {
  104. @include translate(101%, 0);
  105. background: $dark;
  106. bottom: 0;
  107. color: $white;
  108. height: 250px;
  109. overflow: auto;
  110. position: absolute;
  111. top: 0;
  112. width: 100%;
  113. }
  114. .direct-chat-contacts-light {
  115. background: $light;
  116. .contacts-list-name {
  117. color: $gray-700;
  118. }
  119. .contacts-list-date {
  120. color: $gray-600;
  121. }
  122. .contacts-list-msg {
  123. color: darken($gray-600, 10%);
  124. }
  125. }
  126. //Contacts list -- for displaying contacts in direct chat contacts pane
  127. .contacts-list {
  128. @extend .list-unstyled;
  129. > li {
  130. @include clearfix;
  131. border-bottom: 1px solid rgba($black, 0.2);
  132. margin: 0;
  133. padding: 10px;
  134. &:last-of-type {
  135. border-bottom: 0;
  136. }
  137. }
  138. }
  139. .contacts-list-img {
  140. @include border-radius(50%);
  141. float: left;
  142. width: 40px;
  143. }
  144. .contacts-list-info {
  145. color: $white;
  146. margin-left: 45px;
  147. }
  148. .contacts-list-name,
  149. .contacts-list-status {
  150. display: block;
  151. }
  152. .contacts-list-name {
  153. font-weight: 600;
  154. }
  155. .contacts-list-status {
  156. font-size: $font-size-sm;
  157. }
  158. .contacts-list-date {
  159. color: $gray-400;
  160. font-weight: normal;
  161. }
  162. .contacts-list-msg {
  163. color: darken($gray-400, 10%);
  164. }
  165. // Color variants
  166. @each $name, $color in $theme-colors {
  167. .direct-chat-#{$name} {
  168. @include direct-chat-variant($color);
  169. }
  170. }
  171. @each $name, $color in $colors {
  172. .direct-chat-#{$name} {
  173. @include direct-chat-variant($color);
  174. }
  175. }