_direct-chat.scss 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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. &.timestamp-light {
  16. .direct-chat-timestamp {
  17. color: lighten(color-yiq($yiq-text-light), 10%);
  18. }
  19. }
  20. &.timestamp-dark {
  21. .direct-chat-timestamp {
  22. color: darken(color-yiq($yiq-text-dark), 20%);
  23. }
  24. }
  25. }
  26. .direct-chat-messages {
  27. @include translate(0, 0);
  28. height: 250px;
  29. overflow: auto;
  30. padding: 10px;
  31. }
  32. .direct-chat-msg,
  33. .direct-chat-text {
  34. display: block;
  35. }
  36. .direct-chat-msg {
  37. @include clearfix ();
  38. margin-bottom: 10px;
  39. }
  40. .direct-chat-messages,
  41. .direct-chat-contacts {
  42. transition: transform .5s ease-in-out;
  43. }
  44. .direct-chat-text {
  45. @if $enable-rounded {
  46. @include border-radius($border-radius-lg);
  47. }
  48. background-color: $direct-chat-default-msg-bg;
  49. border: 1px solid $direct-chat-default-msg-border-color;
  50. color: $direct-chat-default-font-color;
  51. margin: 5px 0 0 50px;
  52. padding: 5px 10px;
  53. position: relative;
  54. //Create the arrow
  55. &::after,
  56. &::before {
  57. border: solid transparent;
  58. border-right-color: $direct-chat-default-msg-border-color;
  59. content: " ";
  60. height: 0;
  61. pointer-events: none;
  62. position: absolute;
  63. right: 100%;
  64. top: 15px;
  65. width: 0;
  66. }
  67. &::after {
  68. border-width: 5px;
  69. margin-top: -5px;
  70. }
  71. &::before {
  72. border-width: 6px;
  73. margin-top: -6px;
  74. }
  75. .right & {
  76. margin-left: 0;
  77. margin-right: 50px;
  78. &::after,
  79. &::before {
  80. border-left-color: $direct-chat-default-msg-border-color;
  81. border-right-color: transparent;
  82. left: 100%;
  83. right: auto;
  84. }
  85. }
  86. }
  87. .direct-chat-img {
  88. @include border-radius(50%);
  89. float: left;
  90. height: 40px;
  91. width: 40px;
  92. .right & {
  93. float: right;
  94. }
  95. }
  96. .direct-chat-infos {
  97. display: block;
  98. font-size: $font-size-sm;
  99. margin-bottom: 2px;
  100. }
  101. .direct-chat-name {
  102. font-weight: 600;
  103. }
  104. .direct-chat-timestamp {
  105. color: darken($gray-500, 25%);
  106. }
  107. //Direct chat contacts pane
  108. .direct-chat-contacts-open {
  109. .direct-chat-contacts {
  110. @include translate(0, 0);
  111. }
  112. }
  113. .direct-chat-contacts {
  114. @include translate(101%, 0);
  115. background-color: $dark;
  116. bottom: 0;
  117. color: $white;
  118. height: 250px;
  119. overflow: auto;
  120. position: absolute;
  121. top: 0;
  122. width: 100%;
  123. }
  124. .direct-chat-contacts-light {
  125. background-color: $light;
  126. .contacts-list-name {
  127. color: $gray-700;
  128. }
  129. .contacts-list-date {
  130. color: $gray-600;
  131. }
  132. .contacts-list-msg {
  133. color: darken($gray-600, 10%);
  134. }
  135. }
  136. //Contacts list -- for displaying contacts in direct chat contacts pane
  137. .contacts-list {
  138. @include list-unstyled ();
  139. > li {
  140. @include clearfix ();
  141. border-bottom: 1px solid rgba($black, .2);
  142. margin: 0;
  143. padding: 10px;
  144. &:last-of-type {
  145. border-bottom: 0;
  146. }
  147. }
  148. }
  149. .contacts-list-img {
  150. @include border-radius(50%);
  151. float: left;
  152. width: 40px;
  153. }
  154. .contacts-list-info {
  155. color: $white;
  156. margin-left: 45px;
  157. }
  158. .contacts-list-name,
  159. .contacts-list-status {
  160. display: block;
  161. }
  162. .contacts-list-name {
  163. font-weight: 600;
  164. }
  165. .contacts-list-status {
  166. font-size: $font-size-sm;
  167. }
  168. .contacts-list-date {
  169. color: $gray-400;
  170. font-weight: 400;
  171. }
  172. .contacts-list-msg {
  173. color: darken($gray-400, 10%);
  174. }
  175. // Color variants
  176. @each $name, $color in $theme-colors {
  177. .direct-chat-#{$name} {
  178. @include direct-chat-variant($color);
  179. }
  180. }
  181. @each $name, $color in $colors {
  182. .direct-chat-#{$name} {
  183. @include direct-chat-variant($color);
  184. }
  185. }
  186. @include dark-mode () {
  187. .direct-chat-text {
  188. background-color: lighten($dark, 7.5%);
  189. border-color: lighten($dark, 10%);
  190. color: $white;
  191. &::after,
  192. &::before {
  193. border-right-color: lighten($dark, 10%);
  194. }
  195. }
  196. .direct-chat-timestamp {
  197. color: $gray-500;
  198. }
  199. .right > .direct-chat-text {
  200. &::after,
  201. &::before {
  202. border-right-color: transparent;
  203. }
  204. }
  205. // Color variants
  206. @each $name, $color in $theme-colors-alt {
  207. .direct-chat-#{$name} {
  208. @include direct-chat-variant($color);
  209. }
  210. }
  211. @each $name, $color in $colors-alt {
  212. .direct-chat-#{$name} {
  213. @include direct-chat-variant($color);
  214. }
  215. }
  216. }