Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: prefer native [disabled] over [data-disabled] for styles ta… #621

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

LimeWub
Copy link
Contributor

@LimeWub LimeWub commented Feb 19, 2024

…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 the disabled 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 for TileInteractive(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.

@LimeWub LimeWub marked this pull request as ready for review February 19, 2024 10:33
@LimeWub LimeWub self-assigned this Feb 19, 2024
Base automatically changed from fix/tile-interactive-improvements to main February 19, 2024 11:36
@LimeWub LimeWub requested a review from a team February 19, 2024 11:40
Copy link
Contributor

This PR is stale because it has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label May 21, 2024
@LimeWub LimeWub removed the Stale label May 21, 2024
Copy link
Contributor

This PR is stale because it has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 10, 2024
@LimeWub LimeWub force-pushed the refactor/prefer-disabled-over-data-disabled-css branch from 6518e3d to e4f0f86 Compare September 18, 2024 10:17
@LimeWub LimeWub merged commit 75f6447 into main Sep 18, 2024
1 check passed
@LimeWub LimeWub deleted the refactor/prefer-disabled-over-data-disabled-css branch September 18, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants