sforkowany z mirror/soapbox
268 wiersze
5.0 KiB
SCSS
268 wiersze
5.0 KiB
SCSS
.emoji-mart,
|
|
.emoji-mart * {
|
|
box-sizing: border-box;
|
|
line-height: 1.15;
|
|
}
|
|
|
|
.emoji-mart {
|
|
@apply text-base inline-block text-gray-900 rounded bg-white shadow-lg;
|
|
}
|
|
|
|
.emoji-mart .emoji-mart-emoji {
|
|
@apply p-1.5;
|
|
}
|
|
|
|
.emoji-mart-bar {
|
|
border: 0 solid #e5e7eb;
|
|
}
|
|
|
|
.emoji-mart-bar:first-child {
|
|
border-bottom-width: 1px;
|
|
border-top-left-radius: 5px;
|
|
border-top-right-radius: 5px;
|
|
}
|
|
|
|
.emoji-mart-bar:last-child {
|
|
border-top-width: 1px;
|
|
border-bottom-left-radius: 5px;
|
|
border-bottom-right-radius: 5px;
|
|
}
|
|
|
|
.emoji-mart-anchors {
|
|
@apply flex flex-row justify-between px-1.5;
|
|
}
|
|
|
|
.emoji-mart-anchor {
|
|
@apply relative block flex-auto text-gray-400 text-center overflow-hidden transition-colors py-3 px-1;
|
|
}
|
|
|
|
.emoji-mart-anchor:focus { outline: 0; }
|
|
|
|
.emoji-mart-anchor:hover,
|
|
.emoji-mart-anchor:focus,
|
|
.emoji-mart-anchor-selected {
|
|
@apply text-gray-600;
|
|
}
|
|
|
|
.emoji-mart-anchor-selected .emoji-mart-anchor-bar {
|
|
@apply bottom-0;
|
|
}
|
|
|
|
.emoji-mart-anchor-bar {
|
|
@apply absolute -bottom-0.5 left-0 w-11/12 h-0.5 bg-primary-600;
|
|
}
|
|
|
|
.emoji-mart-anchors i {
|
|
@apply inline-block w-full;
|
|
max-width: 22px;
|
|
}
|
|
|
|
.emoji-mart-anchors svg,
|
|
.emoji-mart-anchors img {
|
|
fill: currentColor;
|
|
height: 18px;
|
|
width: 18px;
|
|
}
|
|
|
|
.emoji-mart-scroll {
|
|
overflow-y: scroll;
|
|
overflow-x: hidden;
|
|
height: 270px;
|
|
padding: 0 6px 6px 6px;
|
|
will-change: transform; /* avoids "repaints on scroll" in mobile Chrome */
|
|
}
|
|
|
|
.emoji-mart-search {
|
|
@apply relative mt-1.5 p-2.5 pr-12 bg-white;
|
|
}
|
|
|
|
.emoji-mart-search input {
|
|
@apply text-sm pr-9 block w-full border-gray-300 rounded-full focus:ring-primary-500 focus:border-primary-500;
|
|
|
|
&::-moz-focus-inner {
|
|
border: 0;
|
|
}
|
|
|
|
&::-webkit-search-cancel-button {
|
|
@apply hidden;
|
|
}
|
|
|
|
&::-moz-focus-inner,
|
|
&:focus,
|
|
&:active {
|
|
outline: 0 !important;
|
|
}
|
|
}
|
|
|
|
.emoji-mart-search input,
|
|
.emoji-mart-search input::-webkit-search-decoration,
|
|
.emoji-mart-search input::-webkit-search-cancel-button,
|
|
.emoji-mart-search input::-webkit-search-results-button,
|
|
.emoji-mart-search input::-webkit-search-results-decoration {
|
|
/* remove webkit/blink styles for <input type="search">
|
|
* via https://stackoverflow.com/a/9422689 */
|
|
-webkit-appearance: none;
|
|
}
|
|
|
|
.emoji-mart-search-icon {
|
|
@apply absolute z-10 border-0;
|
|
top: 20px;
|
|
right: 56px;
|
|
padding: 2px 5px 1px;
|
|
}
|
|
|
|
.emoji-mart-search-icon svg {
|
|
@apply stroke-gray-400;
|
|
}
|
|
|
|
.emoji-mart-search-icon:hover svg {
|
|
@apply stroke-gray-800;
|
|
}
|
|
|
|
.emoji-mart-category .emoji-mart-emoji span {
|
|
@apply relative text-center;
|
|
z-index: 1;
|
|
}
|
|
|
|
.emoji-mart-category .emoji-mart-emoji:hover::before {
|
|
z-index: 0;
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: #f4f4f4;
|
|
border-radius: 100%;
|
|
}
|
|
|
|
.emoji-mart-category-label {
|
|
z-index: 2;
|
|
position: relative;
|
|
position: -webkit-sticky;
|
|
position: sticky;
|
|
top: 0;
|
|
}
|
|
|
|
.emoji-mart-category-label span {
|
|
display: block;
|
|
width: 100%;
|
|
font-weight: 500;
|
|
padding: 5px 6px;
|
|
background-color: #fff;
|
|
background-color: rgba(255, 255, 255, 0.95);
|
|
}
|
|
|
|
.emoji-mart-category-list {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.emoji-mart-category-list li {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
display: inline-block;
|
|
}
|
|
|
|
.emoji-mart-emoji {
|
|
position: relative;
|
|
display: inline-block;
|
|
font-size: 0;
|
|
margin: 0;
|
|
padding: 0;
|
|
border: none;
|
|
background: none;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.emoji-mart-emoji-native {
|
|
font-family: "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji";
|
|
}
|
|
|
|
.emoji-mart-no-results {
|
|
@apply text-sm text-center text-gray-600;
|
|
padding-top: 70px;
|
|
}
|
|
|
|
.emoji-mart-no-results-img {
|
|
display: block;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
width: 50%;
|
|
}
|
|
|
|
.emoji-mart-no-results .emoji-mart-category-label {
|
|
display: none;
|
|
}
|
|
|
|
.emoji-mart-no-results .emoji-mart-no-results-label {
|
|
margin-top: 0.2em;
|
|
}
|
|
|
|
.emoji-mart-no-results .emoji-mart-emoji:hover::before {
|
|
content: none;
|
|
}
|
|
|
|
.emoji-mart-preview {
|
|
@apply hidden;
|
|
}
|
|
|
|
/* For screenreaders only, via https://stackoverflow.com/a/19758620 */
|
|
.emoji-mart-sr-only {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
padding: 0;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
clip: rect(0, 0, 0, 0);
|
|
border: 0;
|
|
}
|
|
|
|
.emoji-picker-dropdown__menu {
|
|
@apply rounded-lg absolute mt-1.5;
|
|
transform: translateX(calc(-1 * env(safe-area-inset-right))); /* iOS PWA */
|
|
z-index: 20000;
|
|
|
|
.emoji-mart-scroll {
|
|
transition: opacity 200ms ease;
|
|
}
|
|
|
|
&.selecting .emoji-mart-scroll {
|
|
opacity: 0.5;
|
|
}
|
|
}
|
|
|
|
.emoji-picker-dropdown__modifiers {
|
|
position: absolute;
|
|
top: 65px;
|
|
right: 14px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.emoji-picker-dropdown__modifiers__menu {
|
|
@apply absolute bg-white rounded-3xl shadow overflow-hidden;
|
|
z-index: 4;
|
|
top: -4px;
|
|
left: -8px;
|
|
|
|
button {
|
|
display: block;
|
|
cursor: pointer;
|
|
border: 0;
|
|
padding: 4px 8px;
|
|
background: transparent;
|
|
|
|
&:hover,
|
|
&:focus,
|
|
&:active {
|
|
background: hsla(var(--background-color_hsl), 0.4);
|
|
}
|
|
}
|
|
|
|
.emoji-mart-emoji {
|
|
height: 22px;
|
|
}
|
|
}
|