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

[Joy] Improve cursor pointer and add fallback for outlined variant #35573

Merged
merged 5 commits into from
Dec 22, 2022

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Dec 22, 2022

Cursor

Currently, the cursor: pointer is generated by the hover variants which resulted in this stylesheet in Joy UI components:

&:hover {
  cursor: pointer;
}

This produces several issues:

  1. There is a glitch when moving between ListItemButton

    Screen.Recording.2565-12-22.at.16.44.50.mov
  2. customizing the cursor must be done on :hover state

    <Button sx={{ cursor: 'drag' }} /> // ❌ does not work
    <Button sx={{ '&:hover': { cursor: 'drag' } }} // work

Fallback value

The fallback value is needed for a custom variant, otherwise, the variables that use --variant-borderWidth will resolve to initial.


@siriwatknp siriwatknp added the package: joy-ui Specific to @mui/joy label Dec 22, 2022
@mui-bot
Copy link

mui-bot commented Dec 22, 2022

Messages
📖 Netlify deploy preview: https://deploy-preview-35573--material-ui.netlify.app/

Details of bundle changes

Generated by 🚫 dangerJS against 471e612

@siriwatknp siriwatknp changed the title [Joy] Move cursor pointer from variant to component [Joy] Improve cursor pointer and add fallback for outlined variant Dec 22, 2022
@siriwatknp siriwatknp marked this pull request as ready for review December 22, 2022 09:51
@siriwatknp siriwatknp merged commit a04f578 into mui:master Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: joy-ui Specific to @mui/joy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants