refactor: prefer native [disabled] over [data-disabled] for styles ta… #621
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…rgeting disabled state
This is more of a suggestion PR as nothing is currently breaking due to it, but I think it will be a good change for the codebase.
After fixing
TileInteractive
's disabled state which was wrongly targeting[data-disabled]
, I'm also applying the same changes to all other components with disabled styles.The point is,
[data-disabled]
is a radix data attribute but it will always for accessibility/functionality ALSO be adding thedisabled
native attribute. So we could be targeting either with no issues. Thus targeting[data-disabled]
is mudding the waters when it comes to copying around styles - like I had done forTileInteractive
(which is actually just a native button and not a radix component) a few months ago.If we agree to only be targeting
[disabled]
from now on, these sort of bugs will be avoided and components' css will be more solid as they wont be depending on a radix attribute.