p4535992 / foundryvtt-rarity-colors

MIT License
0 stars 1 forks source link

Tidy 5e Sheets compatibility update #15

Closed kgar closed 7 months ago

kgar commented 7 months ago

This is a PR to restore compatibility with Tidy 5e Sheets. When Tidy introduced an animation container for pure CSS toggles on its item rows, as well as limiting row color just to the row and not the item summary, the change in HTML broke compatibility with rarity colors.

Things I did to restore compat:

Updated Tidy's selectors to work with the latest version of the module.

Updated item dataset retrieval to perform a closest check, to handle cases like Tidy's, where the row to colorize is not also the dataset node. It still works the same for other sheets.

Updated the background setting code to also set the background in addition to background-color, to prevent cases like backgrounds with gradients overlapping with the rarity color unintentionally.

I tested functionality with the new default sheets, and they seem to still be in working order.

p4535992 commented 7 months ago

Sorry just sa w this ! ty for the contribution