.scroller {
  max-block-size: 10rem;
  overflow: auto;
  padding: 0.5rem;
  background: white;
  color: black;
  border: 1px solid silver;
  scroll-timeline: --box block;
}

.item {
  min-block-size: 3.5rem;
  margin-block: 0.5rem;
  padding: 0.75rem;
  background: whitesmoke;
  border: 1px solid silver;
}

.item--target {
  background: #ffe8cc;
}

@supports (animation-timeline: scroll()) {
  .item--target {
    animation: flash linear both;
    animation-timeline: --box;
    animation-range-start: 40%;
    animation-range-end: 90%;
  }
}

@keyframes flash {
  from {
    background: #ffe8cc;
  }
  to {
    background: #c4f0c4;
  }
}