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

fix: incorrect cursor style for Color Picker & Boolean Toggle #184

Merged
merged 4 commits into from
Nov 4, 2022
Merged

fix: incorrect cursor style for Color Picker & Boolean Toggle #184

merged 4 commits into from
Nov 4, 2022

Conversation

cloydlau
Copy link
Contributor

@cloydlau cloydlau commented Nov 3, 2022

  • Color Picker should not show cursor: pointer in text-only mode

  • Boolean Toggle should show cursor: pointer in non-text-only mode

    I'm not sure if this one is intended. But I decide to make this change after I took a look at Svelte Material UI, Vuetify, etc. Giving cursor: pointer to checkbox should be user friendly.

@josdejong
Copy link
Owner

josdejong commented Nov 3, 2022

Thanks for these improvements!

It is another clear demonstration that we need to refactor how we figure out a readonly and selected styles (needing :global across different components) 😁 .

How about applying the refactoring plan that I mention in #178 (comment) already on BooleanToggle and ColorPicker? In the two svelte components we can add:

<div
  ...
  class:jse-readonly={readOnly}
  ...
>

Then in the CSS of the two components, we can use &.jse-readonly or &:not(.jse-readonly). Then all is local inside the component, no need for :global. What do you think?

@josdejong
Copy link
Owner

Thanks for a good discussion and thinking along! Merging this PR now

@josdejong josdejong merged commit 12e60e5 into josdejong:main Nov 4, 2022
@josdejong
Copy link
Owner

The fix is published now in v0.9.2, thanks again Cloyd.

@cloydlau
Copy link
Contributor Author

cloydlau commented Nov 4, 2022

It's my pleasure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants