Frédéric Guimont | 3e5f1b6 | 2016-11-22 11:41:38 -0500 | [diff] [blame] | 1 | body { |
Adrien Beraud | 8e25afb | 2017-04-19 01:38:57 +0200 | [diff] [blame] | 2 | margin: 0; |
AmarOk | b425324 | 2017-07-13 11:21:39 -0400 | [diff] [blame] | 3 | overflow: hidden; |
Adrien Beraud | 8e25afb | 2017-04-19 01:38:57 +0200 | [diff] [blame] | 4 | } |
| 5 | |
| 6 | #container { |
| 7 | position: relative; |
| 8 | height: 100%; |
| 9 | width: 100%; |
AmarOk | b425324 | 2017-07-13 11:21:39 -0400 | [diff] [blame] | 10 | display: flex; |
| 11 | flex-direction: column; |
| 12 | margin: 0; |
| 13 | padding: 0; |
AmarOk | d55d85e | 2017-07-14 09:44:05 -0400 | [diff] [blame] | 14 | justify-content: flex-end; |
Adrien Beraud | 8e25afb | 2017-04-19 01:38:57 +0200 | [diff] [blame] | 15 | } |
| 16 | |
| 17 | #messages { |
AmarOk | b425324 | 2017-07-13 11:21:39 -0400 | [diff] [blame] | 18 | position: relative; |
AmarOk | b425324 | 2017-07-13 11:21:39 -0400 | [diff] [blame] | 19 | z-index: 0; |
Adrien Beraud | 8e25afb | 2017-04-19 01:38:57 +0200 | [diff] [blame] | 20 | width: 100%; |
Frédéric Guimont | 3e5f1b6 | 2016-11-22 11:41:38 -0500 | [diff] [blame] | 21 | overflow-y: scroll; |
AmarOk | b425324 | 2017-07-13 11:21:39 -0400 | [diff] [blame] | 22 | height: auto; |
AmarOk | d55d85e | 2017-07-14 09:44:05 -0400 | [diff] [blame] | 23 | max-height: calc(100% - 50px); |
Frédéric Guimont | 3e5f1b6 | 2016-11-22 11:41:38 -0500 | [diff] [blame] | 24 | } |
| 25 | |
AmarOk | b425324 | 2017-07-13 11:21:39 -0400 | [diff] [blame] | 26 | #sendMessage { |
| 27 | display: flex; |
AmarOk | b425324 | 2017-07-13 11:21:39 -0400 | [diff] [blame] | 28 | position: relative; |
AmarOk | b425324 | 2017-07-13 11:21:39 -0400 | [diff] [blame] | 29 | border-top : 2px solid #d3d3d3; |
AmarOk | 6286ad4 | 2017-07-14 12:11:08 -0400 | [diff] [blame] | 30 | margin-left: 10px; |
| 31 | margin-right: 10px; |
| 32 | padding-left: 8px; |
| 33 | overflow: hidden; |
| 34 | padding-top: 8px; |
| 35 | padding-bottom: 8px; |
| 36 | align-items: center; |
| 37 | |
AmarOk | b425324 | 2017-07-13 11:21:39 -0400 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | #message { |
AmarOk | d55d85e | 2017-07-14 09:44:05 -0400 | [diff] [blame] | 41 | flex: 1; |
AmarOk | 6286ad4 | 2017-07-14 12:11:08 -0400 | [diff] [blame] | 42 | margin-right: 10px; |
| 43 | border: 0; |
| 44 | overflow-y: scroll; |
| 45 | color: black; |
| 46 | max-height: 150px; |
| 47 | padding-left: 8px; |
| 48 | resize: none; |
AmarOk | b425324 | 2017-07-13 11:21:39 -0400 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | #message:focus, |
| 52 | #message.focus { |
AmarOk | b425324 | 2017-07-13 11:21:39 -0400 | [diff] [blame] | 53 | outline: none; |
| 54 | } |
| 55 | |
| 56 | input[placeholder], [placeholder], *[placeholder] { |
| 57 | color: #d3d3d3; |
| 58 | } |
| 59 | |
| 60 | #sendBtn { |
| 61 | border-radius: 50%; |
| 62 | border: 0; |
| 63 | width: 40px; |
| 64 | height: 40px; |
AmarOk | 6286ad4 | 2017-07-14 12:11:08 -0400 | [diff] [blame] | 65 | align-self: center; |
AmarOk | b425324 | 2017-07-13 11:21:39 -0400 | [diff] [blame] | 66 | transition: all 0.3s ease; |
| 67 | } |
| 68 | |
| 69 | #sendBtn.hover, |
| 70 | #sendBtn:hover { |
| 71 | background: #bae5f0; |
| 72 | } |
| 73 | |
| 74 | #sendBtn.hover svg, |
| 75 | #sendBtn:hover svg { |
| 76 | fill: black; |
| 77 | } |
| 78 | |
| 79 | #sendMessage svg { |
| 80 | fill: #666; |
| 81 | padding: 5px; |
| 82 | width: 100%; |
| 83 | height: 100%; |
| 84 | transition: all 0.3s ease; |
| 85 | } |
| 86 | |
| 87 | |
Frédéric Guimont | 3e5f1b6 | 2016-11-22 11:41:38 -0500 | [diff] [blame] | 88 | .wc { |
| 89 | will-change: transform; |
| 90 | } |
| 91 | |
aviau | 32b8dd6 | 2016-11-02 00:36:57 -0400 | [diff] [blame] | 92 | .status_circle { |
| 93 | fill: #A0A0A0; |
| 94 | -webkit-animation: circle-dance; |
| 95 | -webkit-animation-duration: 0.8s; |
| 96 | -webkit-animation-iteration-count: infinite; |
| 97 | -webkit-animation-direction: alternate; |
| 98 | -webkit-animation-timing-function: ease-in-out; |
| 99 | } |
| 100 | |
| 101 | .anim-first { |
| 102 | -webkit-animation-delay: 0.7s; |
| 103 | } |
| 104 | |
| 105 | .anim-second { |
| 106 | -webkit-animation-delay: 0.9s; |
| 107 | } |
| 108 | |
| 109 | .anim-third { |
| 110 | -webkit-animation-delay: 1.1s; |
| 111 | } |
| 112 | |
| 113 | @-webkit-keyframes circle-dance { |
| 114 | 0%,50% { |
| 115 | -webkit-transform: translateY(0); |
| 116 | fill: #A0A0A0; |
| 117 | } |
| 118 | 100% { |
| 119 | -webkit-transform: translateY(-8px); |
| 120 | fill: #000; |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | .status-check { |
Frédéric Guimont | 3e5f1b6 | 2016-11-22 11:41:38 -0500 | [diff] [blame] | 125 | stroke-dasharray: 17; |
| 126 | stroke-dashoffset: 17; |
| 127 | -webkit-animation: dash-check; |
| 128 | -webkit-animation-duration: 0.4s; |
| 129 | -webkit-animation-delay: 0.7s; |
| 130 | -webkit-animation-fill-mode: forwards; |
| 131 | -webkit-animation-timing-function: ease-in-out; |
| 132 | display: none; |
| 133 | } |
| 134 | |
| 135 | .message--sent .status-check { |
| 136 | display: inline-block; |
aviau | 32b8dd6 | 2016-11-02 00:36:57 -0400 | [diff] [blame] | 137 | } |
| 138 | |
| 139 | @-webkit-keyframes dash-check{ |
| 140 | from { |
| 141 | stroke-dashoffset: 17; |
| 142 | } |
| 143 | to { |
| 144 | stroke-dashoffset: 0; |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | .status-x { |
| 149 | stroke-dasharray: 12; |
| 150 | stroke-dashoffset: 12; |
| 151 | -webkit-animation: dash-x; |
| 152 | -webkit-animation-duration: 0.2s; |
| 153 | -webkit-animation-fill-mode: forwards; |
| 154 | -webkit-animation-timing-function: ease-in-out; |
| 155 | } |
| 156 | |
| 157 | .x-first { |
| 158 | -webkit-animation-delay: 0.7s; |
| 159 | } |
| 160 | |
| 161 | .x-second { |
| 162 | -webkit-animation-delay: 0.9s; |
| 163 | } |
| 164 | |
| 165 | @-webkit-keyframes dash-x{ |
| 166 | from { |
| 167 | stroke-dashoffset: 12; |
| 168 | } |
| 169 | to { |
| 170 | stroke-dashoffset: 0; |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | .message_wrapper { |
| 175 | transform: scale(0); |
| 176 | max-width: 50%; |
| 177 | margin: 10px 0; |
| 178 | display: inline-block; |
Frédéric Guimont | 3e5f1b6 | 2016-11-22 11:41:38 -0500 | [diff] [blame] | 179 | padding: 10px; |
aviau | 32b8dd6 | 2016-11-02 00:36:57 -0400 | [diff] [blame] | 180 | border-radius: 10px; |
| 181 | position: relative; |
| 182 | -webkit-animation: talk; |
| 183 | -webkit-animation-duration: 0.3s; |
| 184 | -webkit-animation-delay: 0.1s; |
| 185 | -webkit-animation-fill-mode: forwards; |
| 186 | -webkit-animation-timing-function: ease-in-out; |
| 187 | } |
| 188 | |
| 189 | .message { |
| 190 | font: 0.875em "Open sans",Helvetica,"Segoe UI",sans-serif; |
| 191 | margin: 0; |
| 192 | display: flex; |
| 193 | justify-content: flex-start; |
| 194 | align-items: top; |
| 195 | overflow: hidden; |
| 196 | } |
| 197 | |
AmarOk | 6286ad4 | 2017-07-14 12:11:08 -0400 | [diff] [blame] | 198 | pre { |
| 199 | font : inherit; |
| 200 | font-family : inherit; |
| 201 | font-size : inherit; |
| 202 | font-style : inherit; |
| 203 | font-variant : inherit; |
| 204 | font-weight : inherit; |
| 205 | margin: 0; |
| 206 | padding: 0; |
| 207 | } |
| 208 | |
aviau | 32b8dd6 | 2016-11-02 00:36:57 -0400 | [diff] [blame] | 209 | .message_out { |
| 210 | flex-direction: row-reverse; |
| 211 | } |
| 212 | |
Sébastien Blin | c6f3a26 | 2017-07-28 16:12:24 -0400 | [diff] [blame^] | 213 | .timestamp |
| 214 | { |
| 215 | display: flex; |
| 216 | justify-content: flex-start; |
| 217 | color: #333; |
| 218 | font-size: 10px; |
| 219 | padding: 5px; |
| 220 | } |
| 221 | |
| 222 | .timestamp_out { |
| 223 | flex-direction: row-reverse; |
| 224 | } |
| 225 | |
aviau | 32b8dd6 | 2016-11-02 00:36:57 -0400 | [diff] [blame] | 226 | .message_sender { |
| 227 | display: none; |
| 228 | } |
| 229 | |
| 230 | .sender_image { |
| 231 | border-radius: 50%; |
| 232 | transition: transform 0.2s ease-in-out; |
Frédéric Guimont | 3e5f1b6 | 2016-11-22 11:41:38 -0500 | [diff] [blame] | 233 | margin: 10px; |
aviau | 32b8dd6 | 2016-11-02 00:36:57 -0400 | [diff] [blame] | 234 | } |
| 235 | |
| 236 | .message_in .sender_image { |
| 237 | -webkit-animation-name: enter-stage-left; |
| 238 | -webkit-animation-duration: 0.2s; |
| 239 | -webkit-animation-timing-function: ease-in-out; |
| 240 | } |
| 241 | |
| 242 | .message_out .sender_image { |
| 243 | -webkit-animation-name: enter-stage-right; |
| 244 | -webkit-animation-duration: 0.2s; |
| 245 | -webkit-animation-timing-function: ease-in-out; |
| 246 | } |
| 247 | |
| 248 | @-webkit-keyframes enter-stage-left { |
| 249 | from { |
| 250 | transform: translateX(-100%); |
| 251 | } |
| 252 | to { |
| 253 | transform: translateX(0); |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | @-webkit-keyframes enter-stage-right { |
| 258 | from { |
| 259 | transform: translateX(100%); |
| 260 | } |
| 261 | to { |
| 262 | transform: translateX(0); |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | .message_out > .message_wrapper { |
AmarOk | b425324 | 2017-07-13 11:21:39 -0400 | [diff] [blame] | 267 | background-color: #cfebf5; |
aviau | 32b8dd6 | 2016-11-02 00:36:57 -0400 | [diff] [blame] | 268 | border-top-right-radius: 0; |
| 269 | transform-origin: top right; |
| 270 | } |
| 271 | |
| 272 | .message_out + .message_out > .message_wrapper { |
| 273 | border-top-right-radius: 10px; |
| 274 | } |
| 275 | |
| 276 | .message_in > .message_wrapper { |
| 277 | background-color: #DEDEE0; |
| 278 | border-top-left-radius: 0; |
| 279 | transform-origin: top left; |
| 280 | } |
| 281 | |
| 282 | .message_in + .message_in > .message_wrapper { |
| 283 | border-top-left-radius: 10px; |
| 284 | } |
| 285 | |
| 286 | .message_timestamp { |
Sébastien Blin | c6f3a26 | 2017-07-28 16:12:24 -0400 | [diff] [blame^] | 287 | color: #333; |
| 288 | font-size: 0.8em; |
| 289 | margin-top: 0.5em; |
| 290 | transition: opacity 0.3s ease-in-out; |
| 291 | line-height: 1em; |
| 292 | display: inline-block; |
| 293 | opacity: 0; |
| 294 | float: right; |
| 295 | } |
| 296 | |
| 297 | .message_wrapper:hover .message_timestamp { |
| 298 | opacity: 1; |
Frédéric Guimont | 3e5f1b6 | 2016-11-22 11:41:38 -0500 | [diff] [blame] | 299 | } |
| 300 | |
| 301 | .sent-checkmark { |
Sébastien Blin | c6f3a26 | 2017-07-28 16:12:24 -0400 | [diff] [blame^] | 302 | margin-left: 0.313em; |
| 303 | float: right; |
aviau | 32b8dd6 | 2016-11-02 00:36:57 -0400 | [diff] [blame] | 304 | } |
| 305 | |
| 306 | @-webkit-keyframes fade-in { |
| 307 | from { |
| 308 | opacity: 0; |
| 309 | } |
| 310 | to { |
| 311 | opacity: 1; |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | .message_text { |
| 316 | word-wrap: break-word; |
Frédéric Guimont | 3e5f1b6 | 2016-11-22 11:41:38 -0500 | [diff] [blame] | 317 | display: block; |
aviau | 32b8dd6 | 2016-11-02 00:36:57 -0400 | [diff] [blame] | 318 | } |
| 319 | |
| 320 | @-webkit-keyframes talk { |
| 321 | from { |
| 322 | transform: scale(0); |
| 323 | } |
| 324 | to { |
| 325 | transform: scale(1); |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | .message_in > .message_wrapper:before { |
| 330 | content: ""; |
| 331 | width: 10px; |
| 332 | height: 10px; |
| 333 | position: absolute; |
| 334 | left: -10px; |
| 335 | top: 0; |
| 336 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E %3Cpath d= 'M10,0 L0,0 C10,0 10,10 10,10' fill='%23DEDEE0'/%3E %3C/svg%3E"); |
| 337 | transform-origin: top left; |
| 338 | } |
| 339 | |
| 340 | .message_in + .message_in > .message_wrapper:before { |
| 341 | display: none; |
| 342 | } |
| 343 | |
| 344 | .message_out + .message_out > .message_wrapper:after { |
| 345 | display: none; |
| 346 | } |
| 347 | |
| 348 | .message_out > .message_wrapper:after { |
| 349 | content: ""; |
| 350 | width: 10px; |
| 351 | height: 10px; |
| 352 | position: absolute; |
| 353 | right: -10px; |
| 354 | top: 0; |
AmarOk | b425324 | 2017-07-13 11:21:39 -0400 | [diff] [blame] | 355 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E %3Cpath d= 'M0,0 L10,0 C0,0 0,10 0,10' fill='%23cfebf5'/%3E %3C/svg%3E"); |
aviau | 32b8dd6 | 2016-11-02 00:36:57 -0400 | [diff] [blame] | 356 | transform-origin: top right; |
| 357 | } |
| 358 | |
| 359 | .message_delivery_status { |
| 360 | margin: 10px 10px; |
| 361 | color: #A0A0A0; |
| 362 | opacity: 0; |
| 363 | -webkit-animation-name: fade-in; |
| 364 | -webkit-animation-duration: 0.2s; |
| 365 | -webkit-animation-timing-function: ease-in-out; |
| 366 | -webkit-animation-delay: 0.4s; |
| 367 | -webkit-animation-fill-mode: forwards; |
| 368 | transition: opacity 0.5s ease-in-out; |
| 369 | } |
| 370 | |
| 371 | .message_in + .message_in .sender_image { |
| 372 | opacity: 0; |
| 373 | } |
| 374 | |
| 375 | .message_out + .message_out .sender_image { |
| 376 | opacity: 0; |
| 377 | } |