I cannot find a way to use css transitions on newly created dom elements.
let\'s say I have an empty html document.
I found a nicer way to trigger layout and make transitions work just after appending the element to the DOM:
window.getComputedStyle(element).opacity;