.UI { background-color: lightblue; } #chatwindow { display: flex; flex-flow: column; overflow-y: scroll; overflow-x: clip; word-break: break-word; scroll-snap-align: end; flex-basis: 100vh; flex-grow: 1; } .message:hover { background-color: #DDD; } .message { display: flex; flex-basis: 1.6em; padding-left: 2px; padding-right: 2px; flex-shrink: 0; } .message:hover > :last-child > :first-child { display: flex; } .messagetext { white-space: pre-wrap; flex-grow: 1; word-break: break-all; } .messagedate { font-size: 12px; align-self: start; margin-top: 4px; word-break: keep-all; } .message:not(.deleted) > .messagedate { color: #666; } .message_buttons_anchor { position: relative; } .message_buttons { display: none; position: absolute; /* calc (((button height + anchor padding) / 2) * -1) */ top: calc(((1.6em + 4px) / 2) * -1); /* calc ((buttons amount(button size + button padding) + anchor padding) * -1) */ left: calc((3(1.6em + 4px) + 4px) * -1); right: 0; bottom: 0; margin-right: 8px; padding: 2px; height: min-content; background-color: white; border: 1px solid black; border-radius: 2px; } .message_buttons > button { height: 1.6em; width: 1.6em; padding: 2px; margin: 2px; } #navbar { border-bottom: 2px solid black; width: 100%; display: inline-block; flex-grow: 0; } #inputbox { border-top: 2px solid black; display: flex; } #inputbox > button { /* padding: 0 10px 0 10px; */ width: 4em; } #input { resize: none; flex-grow: 1; font-size: 16px; } * { margin: 0; padding: 0; border: 0; } body { display: flex; flex-direction: column; max-height: 100vh; } .date { text-align: center; font-weight: bold; border-bottom: 1px solid black; } .username { margin-left: 0.3em; margin-right: 0.7em; word-break: keep-all; } .deleted { color: #999; } .new_messages { display: none; text-align: center; background-color: red; color: white; } .reply { font-size: 14px; margin-left: 2em; color: #666; display: flex; } .reply:hover { cursor: pointer; } .reply_icon { font-size: 0.7em; margin: auto; } .highlight { background-color: lightcoral; } .reply_highlight { background-color: lightblue; }