react-sparkle icon indicating copy to clipboard operation
react-sparkle copied to clipboard

Wrong size when overflow is set

Open quintus-luis opened this issue 3 years ago • 2 comments

In order for the div to have overflow on both sides, I think it would make sense to replace 100% with calc(100% + 2 * ${overflowPx})

https://github.com/kmjennison/react-sparkle/blob/18aafa94d43e1206fddb7352f752ee4710b4d4c4/src/SparkleComponent.js#L283

Here is the current outcome: Sample

With change: Sample change

quintus-luis avatar Dec 17 '21 09:12 quintus-luis

Or am I missing something?

Otherwise, I would simply set a PR for it.

quintus-luis avatar Dec 17 '21 09:12 quintus-luis

@quintus-luis You're right, and I welcome a PR!

This doesn't seem to have any practical effect, though, because the canvas is sized correctly.

From the demo, here's the container: container

But the child canvas/sparkles are sized correctly: canvas

kmjennison avatar Dec 17 '21 16:12 kmjennison