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