-
Notifications
You must be signed in to change notification settings - Fork 66
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
Ability to override predefined style object #48
Comments
Hi @Multiply, could you please post a code snippet so I can better understand your need ? |
The problem is the generated spans have a hardcoded Ideally verticalAlign should be set by the parent element, or at least through CSS so it can be customized more easy. So |
I see. What I don't understand is how the hardcoded |
If you want to align the emoji with the rest of the text, wouldn't it be more ideal to use The Emoji component is used on multiple lines in a single parent div. That div is then automatically scrolled, but the browser doesn't properly detect a change in scroll. |
For the record, these styles are declared at https://github.com/tommoor/react-emoji-render/blob/master/src/renderer.js#L20. I didn't write them so I don't know the motivation why In the meantime, I would propose to spread
Not the best API for sure, but at least you wouldn't need to use Finally, I still don't see why your scrolling script wouldn't work as this vertical align thing doesn't change the height of the bounding rect, but I guess there is something I'm not aware of 😅 |
It beats me as well. Using no styles, it works as expected. I honestly didn't debug much further into it. |
The options property is currently not being spread when not using an image based emoji, so it wouldn’t work at the moment. Feel free to open a PR 👍🏻 |
Closing the issue as I solved it by just using the Twemoji variant. |
I'd love to be able to override or entirely disable the current style object.
Especially the
verticalAlign
property is messing up my layout.I've made a local change to fix the issue on my end, but it's very crude (I am just removing all properties, and setting them through a className instead)
The text was updated successfully, but these errors were encountered: