debois / elm-mdl

Elm-port of the Material Design Lite CSS/JS library
Apache License 2.0
963 stars 133 forks source link

No checkbox disabled visual feedback. #368

Open hickscorp opened 6 years ago

hickscorp commented 6 years ago

Generally speaking, elm-mld form items (Textfields, buttons etc) allow the user to visually have an indication on whether or not they can interact with them when they are enabled or disabled.

There is something off with the checkbox components, making it impossible to distinguish between an enabled and a disabled checkbox. It's a visual bug only, as clicking a disabled checkbox (when it has Toggles.disabled) doesn't change its state.

I observe the same problem with the Toggle component.

Example of an enabled text field: image

Example of a disabled text field: image

Example of an enabled checkbox: image

Example of a disabled checkbox: image

SidneyNemzer commented 6 years ago

I just ran into this myself, it looks like part of the problem is that the is-disabled class needs to be applied to the label. You can "manually" do this for now by passing an Options.cs:

Toggles.checkbox
    Mdl
    index
    model.mdl
    [ Material.Options.cs "is-disabled", Toggles.disabled ]