soapbox/app/styles/emoji_picker.scss

348 wiersze
5.7 KiB
SCSS
Czysty Zwykły widok Historia

2020-03-27 20:59:38 +00:00
.emoji-mart {
2020-05-29 00:58:37 +00:00
font-size: 13px;
display: inline-block;
2020-03-27 20:59:38 +00:00
&,
* {
box-sizing: border-box;
line-height: 1.15;
2021-07-10 06:40:00 +00:00
color: var(--primary-text-color);
2020-03-27 20:59:38 +00:00
}
.emoji-mart-emoji {
padding: 6px;
}
}
.emoji-mart-bar {
2020-06-02 22:42:09 +00:00
border: 0 solid var(--background-color);
2020-03-27 20:59:38 +00:00
&:first-child {
border-bottom-width: 1px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
background: var(--foreground-color);
2020-03-27 20:59:38 +00:00
}
&:last-child {
border-top-width: 1px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
display: none;
}
}
.emoji-mart-anchors {
display: flex;
justify-content: space-between;
padding: 0 6px;
2020-06-07 03:55:00 +00:00
color: var(--primary-text-color--faint);
2020-03-27 20:59:38 +00:00
line-height: 0;
}
.emoji-mart-anchor {
position: relative;
flex: 1;
text-align: center;
padding: 12px 4px;
overflow: hidden;
transition: color 0.1s ease-out;
2020-03-27 20:59:38 +00:00
cursor: pointer;
2021-07-10 04:57:54 +00:00
background: transparent;
border: 0;
2020-03-27 20:59:38 +00:00
&:hover {
2020-06-07 03:55:00 +00:00
color: var(--primary-text-color--faint);
2020-03-27 20:59:38 +00:00
}
}
.emoji-mart-anchor-selected {
2020-05-31 02:48:37 +00:00
color: var(--highlight-text-color);
2020-03-27 20:59:38 +00:00
&:hover {
2020-06-02 22:42:09 +00:00
color: var(--highlight-text-color);
2020-03-27 20:59:38 +00:00
}
.emoji-mart-anchor-bar {
bottom: -1px;
}
}
.emoji-mart-anchor-bar {
position: absolute;
bottom: -5px;
left: 0;
width: 100%;
height: 4px;
2020-05-31 02:48:37 +00:00
background-color: var(--highlight-text-color);
2020-03-27 20:59:38 +00:00
}
.emoji-mart-anchors {
i {
display: inline-block;
width: 100%;
max-width: 22px;
}
svg {
fill: currentColor;
max-height: 18px;
}
}
.emoji-mart-scroll {
overflow-y: scroll;
height: 270px;
max-height: 35vh;
padding: 0 6px 6px;
2020-06-02 23:31:55 +00:00
background: var(--foreground-color);
2020-03-27 20:59:38 +00:00
will-change: transform;
&::-webkit-scrollbar-track:hover,
&::-webkit-scrollbar-track:active {
background-color: rgba($base-overlay-background, 0.3);
}
}
.emoji-mart-search {
padding: 10px;
padding-right: 45px;
2020-06-02 23:31:55 +00:00
background: var(--foreground-color);
2021-07-10 04:57:54 +00:00
position: relative;
2020-03-27 20:59:38 +00:00
input {
font-size: 14px;
font-weight: 400;
padding: 7px 9px;
2021-07-10 04:57:54 +00:00
padding-right: 25px;
2020-03-27 20:59:38 +00:00
font-family: inherit;
display: block;
width: 100%;
2020-06-02 23:31:55 +00:00
background: var(--background-color);
2021-07-10 04:57:54 +00:00
color: var(--primary-text-color);
2020-06-07 03:55:00 +00:00
border: 1px solid var(--brand-color--faint);
2020-06-02 23:31:55 +00:00
border-radius: 9999px;
2020-03-27 20:59:38 +00:00
&::-moz-focus-inner {
border: 0;
}
&::-moz-focus-inner,
&:focus,
&:active {
outline: 0 !important;
}
}
}
2021-07-10 04:57:54 +00:00
.emoji-mart-search-icon {
position: absolute;
top: 18px;
right: 45px + 5px;
z-index: 2;
padding: 2px 5px 1px;
border: 0;
background: none;
transition: all 100ms linear;
transition-property: opacity;
pointer-events: auto;
opacity: 0.7;
&:disabled {
cursor: default;
pointer-events: none;
opacity: 0.3;
}
svg {
2021-07-10 06:40:00 +00:00
fill: var(--primary-text-color);
2021-07-10 04:57:54 +00:00
}
}
2020-03-27 20:59:38 +00:00
.emoji-mart-category .emoji-mart-emoji {
cursor: pointer;
span {
z-index: 1;
position: relative;
text-align: center;
}
&:hover::before {
z-index: 0;
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
2020-06-07 03:55:00 +00:00
background-color: hsla(var(--background-color_hsl), 0.7);
2020-03-27 20:59:38 +00:00
border-radius: 100%;
}
}
.emoji-mart-category-label {
z-index: 2;
position: relative;
position: -webkit-sticky;
position: sticky;
top: 0;
span {
display: block;
width: 100%;
font-weight: 500;
padding: 5px 6px;
2020-06-02 23:31:55 +00:00
background: var(--foreground-color);
2020-03-27 20:59:38 +00:00
}
}
2021-07-10 04:57:54 +00:00
/* 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-mart-category-list {
margin: 0;
padding: 0;
}
.emoji-mart-category-list li {
list-style: none;
margin: 0;
padding: 0;
display: inline-block;
}
2020-03-27 20:59:38 +00:00
.emoji-mart-emoji {
position: relative;
display: inline-block;
2021-07-10 04:57:54 +00:00
background: transparent;
border: 0;
padding: 0;
2020-03-27 20:59:38 +00:00
font-size: 0;
span {
width: 22px;
height: 22px;
}
}
.emoji-mart-no-results {
font-size: 14px;
2021-07-10 04:57:54 +00:00
color: var(--primary-text-color--faint);
2020-03-27 20:59:38 +00:00
text-align: center;
2021-07-10 04:57:54 +00:00
padding: 5px 6px;
2020-03-27 20:59:38 +00:00
padding-top: 70px;
.emoji-mart-no-results-label {
margin-top: 0.2em;
2020-03-27 20:59:38 +00:00
}
.emoji-mart-emoji:hover::before {
2021-07-10 04:57:54 +00:00
cursor: default;
2020-03-27 20:59:38 +00:00
content: none;
}
}
.emoji-mart-preview {
display: none;
}
2020-06-03 02:11:01 +00:00
.emoji-picker-dropdown__menu {
@include standard-panel;
background: var(--foreground-color);
position: absolute;
margin-top: 5px;
transform: translateX(calc(-1 * env(safe-area-inset-right))); /* iOS PWA */
2020-06-03 02:11:01 +00:00
z-index: 20000;
.emoji-mart-scroll {
transition: opacity 200ms ease;
}
&.selecting .emoji-mart-scroll {
opacity: 0.5;
}
}
.emoji-picker-dropdown__modifiers {
position: absolute;
top: 60px;
right: 11px;
cursor: pointer;
}
.emoji-picker-dropdown__modifiers__menu {
position: absolute;
z-index: 4;
top: -4px;
left: -8px;
background: var(--foreground-color);
border-radius: 4px;
box-shadow: 1px 2px 6px rgba($base-shadow-color, 0.2);
overflow: hidden;
button {
display: block;
cursor: pointer;
border: 0;
padding: 4px 8px;
background: transparent;
&:hover,
&:focus,
&:active {
2020-06-07 03:55:00 +00:00
background: hsla(var(--background-color_hsl), 0.4);
2020-06-03 02:11:01 +00:00
}
}
.emoji-mart-emoji {
height: 22px;
}
}
.emoji-mart-emoji {
span {
background-repeat: no-repeat;
}
}
2021-07-10 06:40:00 +00:00
.font-icon-picker {
.emoji-mart-search {
// Search doesn't work. Hide it for now.
display: none;
padding: 10px !important;
}
.emoji-mart-category-label > span {
padding: 9px 6px 5px;
}
.emoji-mart-scroll {
border-radius: 4px;
}
.emoji-mart-search-icon {
right: 18px;
}
.emoji-mart-bar {
display: none;
}
.fa {
font-size: 18px;
width: 22px;
height: 22px;
text-align: center;
}
}