axieinfinity/festival

on style cascading

Opened this issue · 0 comments

Can you guess what's the color of this without looking at browser:

<div className="bg-red bg-blue" />

It depends on CSS's definition order, which is not guaranteed by Tailwind (and that's a good thing).

What should be done is to be sure one type of attribute can only be set at most once. In other words, use JS or whatever to ensure there is only one "bg-foo" at the final result