Skip to content

Edge-Drop is a clipboard shelf on the edge of your screen. Hover to open it. Drag files and images into any app, click to copy text and links. Free and open-source for Windows.

5.9 KB
Raw Blame
/* Emoji picker — matches the blade: deep black, pills, compositor-only motion. */

.emoji-picker {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Category bar wrapper (SegmentedControl inside) */
.emoji-cat-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 0;
  margin: 4px var(--pad) 6px;
  height: 32px;
  box-sizing: border-box;
  flex-shrink: 0;
  box-shadow: none;
  overflow: visible;
}

.emoji-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px var(--pad) 8px;
  scrollbar-width: none;
  overscroll-behavior-y: contain;
}
.emoji-grid::-webkit-scrollbar {
  display: none;
}

.emoji-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  height: 36px;
  /* Offscreen rows skip layout/paint/decode entirely; the intrinsic size is
     exact (rows are fixed-height), so the scrollbar never jumps. */
  content-visibility: auto;
  contain-intrinsic-size: auto 36px;
}

.emoji-cell {
  width: 100%;
  height: 36px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  color: inherit;
  position: relative;
  /* No forced layer (translateZ): one compositor layer per cell (130-340 of
     them) made every grid update costlier. The hover/press scale still runs
     on the compositor while it animates. */
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.14s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-user-drag: none;
  user-select: none;
}
.emoji-cell:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(1.16);
  z-index: 2;
}
.emoji-cell:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.22);
}

.emoji-glyph {
  width: 26px;
  height: 26px;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  object-fit: contain;
  transition: filter 0.14s ease;
}
.emoji-cell:hover .emoji-glyph {
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4));
}

/* Fast Category Glass Tooltip */
.emoji-cat-tooltip {
  position: absolute;
  top: 48px;
  z-index: 10;
  padding: 4px 10px;
  border-radius: 999px;
  background: #141414;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
  transform: translateX(-50%);
  pointer-events: none;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.01em;
  animation: emojiCatTooltipFade 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes emojiCatTooltipFade {
  from {
    opacity: 0;
    transform: translate(-50%, -4px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

/* Recents Clear Button */
.emoji-recents-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px var(--pad) 8px;
  flex-shrink: 0;
}

.emoji-recents-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #141414;
  border: none;
  color: #ff6b6b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s cubic-bezier(0.22, 1, 0.36, 1), color 0.15s ease;
  box-shadow: none;
}
.emoji-recents-clear-btn:hover {
  background: rgba(239, 68, 68, 0.16);
  color: #ff8585;
}
.emoji-recents-clear-btn:active {
  transform: scale(0.96);
}

.emoji-tone-pop {
  position: absolute;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 14px;
  background: #141414;
  border: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, calc(-100% - 8px));
  pointer-events: auto;
}
.emoji-tone-pop-below {
  transform: translate(-50%, 8px);
}
.emoji-tone-choice {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  transition: background var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.emoji-tone-choice:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.1);
}
.emoji-tone-choice:active {
  transform: scale(0.94);
}

.emoji-empty,
.emoji-status {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: calc(12.5px * var(--font-scale, 1));
}

.emoji-skel {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 12px var(--pad);
}
.emoji-skel i {
  display: block;
  aspect-ratio: 1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   Horizontal Dock Mode (Top & Bottom Edge)
   ========================================================================== */

.emoji-picker.horizontal {
  padding: 2px 14px 4px;
  height: 100%;
  box-sizing: border-box;
}

.emoji-picker.horizontal .emoji-cat-bar {
  max-width: 100%;
  width: auto;
  margin: 0 auto 6px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 0;
  gap: 0;
  box-shadow: none;
  overflow: visible;
}

.emoji-picker.horizontal .emoji-cat-tooltip {
  top: 34px;
  padding: 3px 8px;
  font-size: 11px;
}

.emoji-picker.horizontal .emoji-grid {
  padding: 2px 6px 4px;
}

.emoji-picker.horizontal .emoji-row {
  gap: 2px;
  height: 32px;
  contain-intrinsic-size: auto 32px;
}

.emoji-picker.horizontal .emoji-cell {
  height: 32px;
  border-radius: 7px;
}

.emoji-picker.horizontal .emoji-recents-footer {
  position: absolute;
  top: 3px;
  right: 14px;
  padding: 0;
  height: 28px;
  display: flex;
  align-items: center;
  z-index: 5;
}

.emoji-picker.horizontal .emoji-recents-clear-btn {
  height: 24px;
  padding: 0 10px;
  font-size: 11px;
}

.emoji-picker.horizontal .emoji-skel {
  padding: 6px 8px;
  gap: 4px;
}