-
Notifications
You must be signed in to change notification settings - Fork 836
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
Support custom font size for Emoji Preview text #739
Support custom font size for Emoji Preview text #739
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @cmunozgar 🙂
I left a couple of comments that I think would make this more clear.
Thanks for the suggestions @guldenmw |
Thanks for the PR. I feel like it would make more sense as a CSS variable, so that it can be configured via CSS (i.e. https://missiveapp.com/open/emoji-mart/example-custom-styles.html). Eventually, we will add CSS Shadow Parts (see example https://css-tricks.com/styling-in-the-shadow-dom-with-css-shadow-parts) so that every part is easier to customize. |
…ithub.com/cmunozgar/emoji-mart into add-emoji-preview-font-size-customization
Thank you, @EtienneLem, for your response! I have simplified the PR to use the CSS variable instead, following the same naming convention. Let me know if this one makes more sense. |
Thank you @cmunozgar. I have updated it a bit:
It will be configurable like this: em-emoji-picker {
--preview-placeholder-size: 14px;
} |
Thank you @EtienneLem! |
@@ -46,6 +46,10 @@ | |||
|
|||
--sidebar-width: 16px; | |||
|
|||
--preview-placeholder-size: 21px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I realize here @EtienneLem is that we should probably use an internal variable name and check if a global variable is present or if the value should default to 21px. Otherwise, there's no way to customize the size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've created this small PR to address the override of the CSS variable: #779
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be working in v5.5.1
Set a custom font size for the Emoji Preview placeholder text. By default,
21px
.