codeforamerica / honeycrisp-gem

A Rails gem with base styles and Javascript for Code for America products
http://honeycrisp.herokuapp.com
MIT License
26 stars 8 forks source link

`cfa_checkbox` adds an "is-disabled" class when the field is disabled, but there's no corresponding CSS class to style it #199

Open hartsick opened 4 years ago

hartsick commented 4 years ago

Right now if a cfa_checkbox in the FormBuilder is disabled, the method adds the is-disabled class but there is no corresponding CSS to style that class.

What is the styling we expect for a disabled checkbox?

I think the CSS styles should be here.

bytheway875 commented 3 years ago
Screen Shot 2021-02-26 at 3 29 53 PM

In GYR, we handled this by setting opacity to .5 for the entire checkbox, and adding a "not allowed" cursor when you hover. Wondering if something like that would be what we're going for @racheledelman

bytheway875 commented 3 years ago

The contrast is a little low -- maybe .65 opacity is a sweeter spot

hartsick commented 3 years ago

@bytheway875 did you all style this using the is-disabled class? I'm planning to remove that class in the new form builder to reduce complication in the logic. I think this may be difficult to target using CSS since disabled happens at the input level and this styling is applied higher, but the class could easily be passed down with label classes (though could be easy to forget) or applied via Javascript (similar to how we're handling is-selected, though a bit different case). anyway, wanted to both give you a heads up and solicit your thoughts.