zachdaniel / tails

Utilities for working with tailwind classes, like semantic merge, and conditional class lists.
MIT License
85 stars 9 forks source link

Support deeply-nested theme colors #8

Closed rellen closed 1 year ago

rellen commented 1 year ago

Theme colors in tailwind can be deeply-nested, e.g. "my_theme": {"neutral": {"gray": "#DDDDDD", ...}}

These classes are not surfaced by Tails so it is not able to merge classes using them with other color-related classes.

I assume this is just a limitation in the implementation, not a conscious decision? If so, here is a PR that improves the Tails.Color.all_color_classes function to support deeper-nested colors: https://github.com/zachdaniel/tails/pull/7

zachdaniel commented 1 year ago

Awesome report, and excellent fix!