Example
- Javascript function adds some CSS class to HTML element.
- Because of that, HTML element starts to animate its styles (hiding) with
transition. - After it hides we want to execute another JS function to add another CSS class to another element and make it visible.
The problem is that functions are JS code, but animations — CSS.
How to use the same time values for JS and CSS code? I want to follow DRY and get only single source of truth.
Is it possible?