.upload-list__item--success {
  .upload-list__link {
    // Step 1: A local variable for the animation is made here
    --color-uploadLinkColor: #{returnColorCSSVar('brand-primary')};
    animation: fileUploadSuccessAnimation $transition-duration--fast 2s forwards;

    // Step 2: The different background variant classes are added, which will update the local variable with the right link color
    @include bg-variants() {
      --color-uploadLinkColor: #{variant-property('linkIdle')};
    }
  }
}

@keyframes fileUploadSuccessAnimation {
  // Step 3: The local variable is used in the animation
  100% {
    color: returnColorCSSVar('uploadLinkColor');
  }
}

.upload-list__success {
  svg {
    color: returnColorCSSVar('ui-positive');

    @include bg-variants {
      color: variant-property('positive');
    }
  }
}
