Closed rschristian closed 3 years ago
Humm, yeh.. this is partly an oversight but at the same time, a syntax that I would probably not want to encourage if I were creating tailwind as a language from scratch. In oceanwind the -
delimiter has a very special meaning/purpose and the introduction of a variable with a -
in it messes with that.
My suggestion would be to remove the -
from regal-blue
and make it regalblue
or regalBlue
but I will leave this issue open for visibility for now to help anyone else that might come across the same thing.
I'm not totally against covering it but I just think that this, as you say, is a completely avoidable edge case.
I don't think I'm going to cover this case any time soon so closing here.. feel free to open a PR if you get the time!
As the title states, users of Oceanwind cannot use multi-word colors though this is possible in Tailwind.
The reason for this can be found here. The logic assumes that the item at index 2 of the broken up string ("bg-regal-blue-500" -> "bg", "regal", "blue", "500") is the key in which to index the item at index 1 with. This works fine when the color is a single word, but fails when the color is a hyphenated word as the string split character is a hyphen.
This very well could be a intended sacrifice in functionality but it's something I ran across. Certainly easy enough to work around but I thought I would bring it up.