// use inside of jAutoWidthHTMLLabel // pairs: (HTML text, false=left/true=right) // sadly, no padding possible with this div/span arrangement sS htmlForJLabel_chatConvo(LPair dialog) { ret lines(mapPairsToList(dialog, (content, right) -> { S color = right ? "#9999FF" : "#99FF99"; ret div(span(content, style := "background: \*color*/"), style := "margin-bottom: 10px; margin-" + (right ? "left" : "right") + ": 20px" + (right ? "; text-align: right" : "")); })); }