-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sparkles make words jump (on small screen sizes) #2
Comments
Thanks for the bug report. :)
Unfortunately, I fail to reproduce this one.
Yeah, I see how an inline element spanning multiple lines leads to surprising behavior. I'm not sure about injecting spans though. Ideally, Two quick examples I could think of: <sparkly-text><strong>a word</strong></sparkly-text>
<strong><sparkly-text>a word</sparkly-text></strong> Not sure, if injecting spans wouldn't introduce corner cases. 🤔 |
can reproduce with chrome 119 & 121 (canary) on mac sparkles.mp4fun experiment to make with spans, I will try something |
Thanks for the repo. :) Yeah this indeed looks like a browser bug. 🫣
I thought a bit more about it and I think I might have changed my mind. The element is called
Cool! Then I'll wait a bit. And no pressure — any help is greatly appreciated. :) |
When sparkles appear / disappear they make words jump to the next line (and back)
captures (around 430px viewport width, chrome desktop) same on android device (412px viewport with)
chrome bug it seems, as the span & svg are positioned (absolute) they should not make siblings move.
firefox & safari mac do not seem to be affected.
note : a sparkle may appear at the end of an empty line (when one word go to next line)
a solution might be to not place with top & left but create a span for each word and place randomly the sparkle wrapper between the spans.
The text was updated successfully, but these errors were encountered: