My dark mode toggle is functioning with the following CSS:
:root {
--primary: var(--white);
}
.dark {
--primary: var(--black);
}
However, when I include the following code:
* {
@apply transition-colors duration-700;
}
The background colors of my divs transition smoothly, but there is a delay of about a second in the color transition of the text, which doesn't look good. Why is this happening and how can I solve this issue?
UPDATE: You can see this issue in action here: https://play.tailwindcss.com/DdPehHPHj1