click:update
Re-render the doodle each time it is clicked, with a new random seed.
Syntax
- <css-doodle click:update></css-doodle>
The attribute takes no value. Removing it stops the behaviour.
The older name click-to-update still works.
A seed or @seed keeps the same image.
Examples
<css-doodle click:update>
@grid: 4 / 60vmin _5px ^-10px;
transition: .2s;
outline: 5px solid #000;
border-radius: @p.cycle(100% 0 0 0);
</css-doodle> The same thing from JavaScript, for any other trigger:
const doodle = document.querySelector('css-doodle');
button.addEventListener('click', () => doodle.update());