Closed mvsrgc closed 4 years ago
This works as I'd expect:
Styles applied directly to an element override styles applied by the parent in CSS.
That's fair, but why is it that adding 'text-white' to the first "a" element does not override it's purple color?
I've read up on class priority and apparently the last class should have more importance, but the link stays purple even if you set text-white after text-purple.
The last class in the CSS file gets more priority, not the last class in the class attribute in the HTML 👍🏻
Best practice is don't apply two utilities to the same element that target the same property.
https://tailwind.run/8Pkjaa/2
Add a text-white class to the second div, you will see that it does not change the color of the a element which specifies a purple color.
Thank you :)