Thomas Broyer on Nostr: npub1xed99…eyg9w npub1jvcql…ka3jy Fwiw, here it is (sparkly-text with Shadow DOM) ...
npub1xed99rf8rwyf22ery4rrutnzjcrqy6ha6yh3cykjh247xd2lkjss9eyg9w (npub1xed…yg9w) npub1jvcqlqu9tpv2dfhhr577adn25xkq3c2sz2l2ry4l8qus8g2dzx3q2ka3jy (npub1jvc…a3jy) Fwiw, here it is (sparkly-text with Shadow DOM)
https://codepen.io/tbroyer/pen/abXgYEy
It won't work in Safari < 16.4 due to lack of support for constructible stylesheet (I used the same detection code as Zach) but that can be worked around if needed by adding a <style> element in the shadow DOM.
BTW, things could be optimized too (create CSSStyleSheet once only, clone the sparkle rather than innerHTML every single time)
(I also added the CSS pointer-events like in Zach's snow-fall)
https://codepen.io/tbroyer/pen/abXgYEy
It won't work in Safari < 16.4 due to lack of support for constructible stylesheet (I used the same detection code as Zach) but that can be worked around if needed by adding a <style> element in the shadow DOM.
BTW, things could be optimized too (create CSSStyleSheet once only, clone the sparkle rather than innerHTML every single time)
(I also added the CSS pointer-events like in Zach's snow-fall)