Fix vertical scrollbar of emoji picker header

Ref: grouped-emoji-picker
This commit is contained in:
Tusooa Zhu 2021-10-08 14:10:17 -04:00
parent 5ab51613b7
commit d00ebc14f1
No known key found for this signature in database
GPG Key ID: 7B467EDE43A08224

View File

@ -1,5 +1,10 @@
@import '../../_variables.scss'; @import '../../_variables.scss';
$emoji-picker-header-height: 36px;
$emoji-picker-header-picture-width: 32px;
$emoji-picker-header-picture-height: 32px;
$emoji-picker-emoji-size: 32px;
.emoji-picker { .emoji-picker {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -23,9 +28,11 @@
display: inline-flex; display: inline-flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 30px; width: $emoji-picker-header-picture-width;
height: 24px; max-width: $emoji-picker-header-picture-width;
img { height: $emoji-picker-header-picture-height;
max-height: $emoji-picker-header-picture-height;
.still-image {
max-width: 100%; max-width: 100%;
max-height: 100%; max-height: 100%;
object-fit: contain; object-fit: contain;
@ -50,7 +57,7 @@
.heading { .heading {
display: flex; display: flex;
height: 32px; //height: $emoji-picker-header-height;
padding: 10px 7px 5px; padding: 10px 7px 5px;
overflow-x: auto; overflow-x: auto;
} }
@ -87,11 +94,19 @@
min-width: 0; min-width: 0;
flex-basis: auto; flex-basis: auto;
flex-shrink: 1; flex-shrink: 1;
display: flex;
align-content: center;
&-item { &-item {
padding: 0 7px; padding: 0 7px;
cursor: pointer; cursor: pointer;
font-size: 1.85em; font-size: 1.85em;
width: $emoji-picker-header-picture-width;
max-width: $emoji-picker-header-picture-width;
height: $emoji-picker-header-picture-height;
max-height: $emoji-picker-header-picture-height;
display: flex;
align-items: center;
&.disabled { &.disabled {
opacity: 0.5; opacity: 0.5;
@ -181,11 +196,11 @@
} }
&-item { &-item {
width: 32px; width: $emoji-picker-emoji-size;
height: 32px; height: $emoji-picker-emoji-size;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
font-size: 32px; font-size: $emoji-picker-emoji-size;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin: 4px; margin: 4px;