0

Where should I put react transition group style classes in my scss ? I want to animate fading. After inspecting it in action I clearly see the classes attached, but with no effect. I think I treid putting them almost everywhere.

Anyone with experience ?

#transitionGroupDiv{
    // gallery styles etc.

// NOT WORKING HERE
  .fade-enter {
    opacity: 0;
  }

  .fade-enter-active {
    opacity: 1;
    transition: opacity 10000ms ease-out;
  }

  .fade-leave {
    opacity: 1;
  }

  .fade-leave-active {
    opacity: 0;
    transition: opacity 10000ms ease-out;
  }

    .element{
        // other styles etc.

    }
}

1 Answers1

0

I actually was not aware of scss rules. You have to use the parent selector reference &. Example in this question: SO question.