Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

2.1 KB
Raw Blame
.wrapper {
  box-sizing: border-box;
  min-height: 41px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1.5px solid var(--hi-border, rgba(0, 0, 0, 0.14));
  border-radius: 999px;
  padding: 3px;
  background: var(--hi-card-bg, transparent);
  transition: border-color 150ms cubic-bezier(0.4, 0, 0.2, 1);

  &:has(input:focus-visible) {
    outline: 2px solid var(--hi-accent-text, var(--hi-accent, currentColor));
    outline-offset: 2px;
  }
}

.control {
  position: relative;
  flex-shrink: 0;
  border-radius: 999px;
  border: none;
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1), opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);

  &::after {
    content: '';
    position: absolute;
    inset: -7px;
  }

  &:disabled {
    border: none;
    opacity: 0.5;
    background: transparent;
  }
}

.decrement {
  background: transparent;
  color: var(--hi-text, inherit);

  &.control:hover {
    background: var(--hi-inset-bg, rgba(0, 0, 0, 0.05));
    color: var(--hi-text, inherit);
  }
}

.increment {
  background: var(--hi-soft-accent, rgba(0, 0, 0, 0.06));
  color: var(--hi-accent-text, var(--hi-accent, inherit));

  &.control:hover {
    background: var(--hi-soft-accent-strong, var(--hi-soft-accent, rgba(0, 0, 0, 0.1)));
    color: var(--hi-accent-text, var(--hi-accent, inherit));
  }

  &[data-limit] {
    opacity: 0.5;
    cursor: not-allowed;
  }
}

.input {
  padding: 0 4px !important;
  height: auto !important;
  min-height: 0 !important;
  line-height: 1.4 !important;
  min-width: 34px;
  width: 34px;
  flex: 0 0 auto !important;
  text-align: center !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  font-variant-numeric: tabular-nums;
  color: var(--hi-text, inherit) !important;

  @media (hover: none) and (pointer: coarse) {
    font-size: 16px !important;
  }
}

.compact {
  min-height: 33px;
  padding: 2px;

  .input {
    min-width: 28px;
    width: 28px;
    font-size: 13px !important;

    @media (hover: none) and (pointer: coarse) {
      font-size: 16px !important;
    }
  }
}