discourse/app/assets/stylesheets/common/components/emoji-picker.scss
Kris 2655f4673d
UX: update chat form to formkit, clean up chat modal styles (#40845)
The new channel form was looking a little long in the tooth, and
updating it to formkit makes a lot of general improvements.

Before:
<img width="350" alt="image"
src="https://github.com/user-attachments/assets/20836a59-86e8-4989-a2c5-9c104208b2b9"
/>


After:
<img width="350" alt="image"
src="https://github.com/user-attachments/assets/f3bdec2f-49b2-4dbc-ba54-c6e3f51288c6"
/>



Also updated some general chat styles... we were missing a lot of
general shared styles here

before/after

<img width="450" alt="image"
src="https://github.com/user-attachments/assets/58bd6e4e-584f-49c9-9b61-ac36dac13626"
/>

<img width="450" alt="image"
src="https://github.com/user-attachments/assets/82b9da42-854c-4829-a09d-3f258e846fb1"
/>


before/after

<img width="450" alt="image"
src="https://github.com/user-attachments/assets/5885866d-7955-4b0c-92f7-dad8a29dd7ca"
/>


<img width="450" alt="image"
src="https://github.com/user-attachments/assets/1d6b6a47-d47e-4005-912d-a6108e15d2b3"
/>


before/after

<img width="400" alt="image"
src="https://github.com/user-attachments/assets/c948521c-7571-4281-975f-f2f41fe8bad5"
/>

<img width="400" alt="image"
src="https://github.com/user-attachments/assets/a87df09c-0574-4f2f-95c1-afd06ad6f6e4"
/>
2026-06-15 09:17:14 -04:00

317 lines
5.4 KiB
SCSS
Vendored

@use "lib/viewport";
.fk-d-menu[data-content][data-identifier="emoji-picker"] {
z-index: z("modal", "dialog");
.emoji-picker {
max-width: 95vw;
}
}
.fk-d-menu-modal {
.emoji-picker {
max-width: 100vw;
}
}
.emoji-picker-trigger {
gap: var(--space-1);
.d-icon + .d-button-label {
margin-left: 0.25em;
}
.d-icon.emoji-picker__caret {
font-size: var(--font-down-2);
margin-left: 0;
}
}
.emoji-picker {
display: flex;
flex-direction: column;
height: 300px;
width: 500px;
@include viewport.until(sm) {
height: auto;
}
.spinner-container {
height: 100%;
width: 100%;
}
&__diversity-menu.fk-d-menu {
z-index: z("modal", "dialog");
.dropdown-menu {
min-width: auto;
}
}
.emoji {
padding: 6px;
width: 24px;
height: 24px;
image-rendering: -webkit-optimize-contrast;
cursor: pointer;
&:hover,
&:focus {
background: var(--primary-very-low);
border-radius: var(--d-border-radius);
transform: scale(1.25);
}
}
&__filter-container {
background: var(--primary-very-low);
display: flex;
height: 50px;
@include viewport.until(sm) {
padding-top: 0.25rem;
}
}
&__filter {
width: 100%;
margin: 0.5rem;
border-radius: var(--d-border-radius);
box-sizing: border-box;
input {
background-color: transparent !important;
width: 100%;
}
.d-icon {
color: var(--primary-medium);
}
&.filter-input-container {
border-color: transparent;
background: var(--secondary);
}
}
&__content {
display: flex;
flex-direction: row;
height: 250px;
@include viewport.until(sm) {
flex-direction: column;
padding-top: 1em;
box-sizing: border-box;
}
}
&__scrollable-content {
width: 100%;
overflow-y: scroll;
overscroll-behavior: contain;
height: 100%;
}
&__no-results {
margin: 0;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
font-weight: 700;
padding: 2em;
}
&__sections-nav {
display: flex;
flex-direction: column;
min-width: 40px;
overflow-y: auto;
overflow-x: hidden;
height: 250px;
background: var(--primary-low);
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
overscroll-behavior: contain;
@include viewport.until(sm) {
order: 1;
height: 50px;
width: 100%;
flex-direction: row;
display: flex;
box-sizing: border-box;
overflow-y: hidden;
overflow-x: auto;
}
}
&__sections-nav::-webkit-scrollbar {
display: none;
}
&__section-btn {
padding: 0.25rem;
&:hover {
.emoji {
background: none;
}
}
&:focus,
&.active {
background: none;
}
&.active {
scale: 1.4;
}
.emoji {
width: 21px;
height: 21px;
}
}
&__section-emojis,
&__section.filtered {
padding: 0.5rem;
}
&__backdrop {
height: 100%;
background: rgb(0, 0, 0, 0.75);
bottom: 0;
top: 0;
left: 0;
right: 0;
}
&__section-title-container {
display: flex;
position: sticky;
top: -1px; // to avoid an ugly sub 1px gap on retina
background: rgb(var(--secondary-rgb), 0.95);
z-index: 2;
}
&__section-title {
margin: 0;
padding: 0.5rem;
color: var(--primary-high);
font-size: var(--font-down-2);
font-weight: 700;
width: 100%;
box-sizing: border-box;
text-transform: uppercase;
}
&__fitzpatrick-modifier-btn {
min-width: 21px;
width: 21px;
height: 21px;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
background: none;
margin-right: 0.5rem;
border: 0;
border-radius: var(--d-border-radius);
.d-icon {
visibility: hidden;
}
&.current {
min-width: 25px;
width: 25px;
height: 25px;
}
&:not(.current):hover,
&:not(.current):focus {
.d-icon {
visibility: visible;
color: white;
filter: drop-shadow(0.5px 1.5px 0 rgb(0, 0, 0, 0.3));
}
}
&:last-child {
margin-right: 0;
}
&.t1 {
background: #ffcc4d;
}
&.t2 {
background: #f7dece;
}
&.t3 {
background: #f3d2a2;
}
&.t4 {
background: #d5ab88;
}
&.t5 {
background: #af7e57;
}
&.t6 {
background: #7c533e;
}
@media (forced-colors: active) {
forced-color-adjust: none;
}
}
&__fitzpatrick-scale {
display: flex;
align-items: center;
}
}
@include viewport.until(sm) {
.fk-d-menu-modal.emoji-picker-content {
// specificity is important for the styles in this container
html:not(.keyboard-visible.mobile-view) & .d-modal__container {
height: calc(var(--composer-vh, 1dvh) * 100);
max-height: 100%;
.emoji-picker__content {
height: calc(
var(--composer-vh, 1dvh) * 100 - 50px - env(safe-area-inset-bottom)
);
}
}
html.keyboard-visible.mobile-view & .d-modal__container {
.emoji-picker__content {
height: calc(var(--composer-vh, 1dvh) * 100 - 50px);
}
}
.d-modal__body {
padding: 0;
}
.d-modal__container {
align-self: flex-start;
}
.emoji-picker__close-btn {
margin-left: 0.25em;
padding-left: 0.75em;
}
}
}