ight: 40px;
  width: 100px;
  position: relative;
  background: linear-gradient(to right in lch longer hue,
                              red var(--from),
                              blue var(--to));
}

.swatch {
  --from: 20px;
  --to: 80px;
}

.swatch::before {
  content: '\feff';
  position: absolute;
  bottom: 40px;
  height: 10px;
  left: calc(var(--from) - 0.5px);
  border: 0.5px solid red;
}

.swatch::after {
  content: '\feff';
  position: absolute;
  top: 40px;
  height: 10px;
  left: calc(var(--