Question: Hmm, what's the reason shrinking gets harder and why is less hard for bools? Because there is only true and false?

Asked By
christophp
Asked At
2018-02-22 16:27:59

Found 15 possible answers.

User Answered At Possible Answer
ilias 2018-02-22 16:29:11 Yeah. It's also harder to come up with a generalised shrinking strategy for andMap as opposed to something like map5 where you know there are exactly 5 fuzzers that need shrinking andMap is essentially a chain of map2 . I think the main thing is really just performance, though, now that I'm looking at the code
christophp 2018-02-22 16:52:09 Awesome, the andMap is working for me. Thanks @ilias You're answers are great you should start charging for them (please don't :slightly_smiling_face: )
norpan 2018-02-22 17:39:17 @chadtech visual differences are just css, right?
chadtech 2018-02-22 17:40:27 What do you mean? With no css, disabled checkboxes look different from non-check boxes.
norpan 2018-02-22 17:41:41 Indeed, but with css they may not. If you care about visuals you will have css. So you can add a case for a disabled checkbox to make it look the way you want. Having all sorts of javascript magic to prevent users from checking boxes when there is a simple property seems strange.
chadtech 2018-02-22 17:42:27 Could you style a disabled check box to to look like a non-disabled one? It sounds like a huge pain. Its kind of a separate, from just the narrow question of how to style a check box, but if you want check box _functionality_ and not just a check box html element, it seems like custom toggle stuff is the way to go. Like divs and svgs.
norpan 2018-02-22 17:43:18 First, I’m not really sure why you would have a checkbox that can’t be clicked look like on that can. Second, yes, it’s pretty easy. For sure, if you don’t want a check box, use something else, then you don’t have to worry about any default behaviour either.
chadtech 2018-02-22 17:44:37 Haha, yeah a check box that cant be clicked on but looks like it can does sound like a unrealist usecase.
norpan 2018-02-22 17:46:04 But sure, you can do whatever you like, I’m just saying that some HTML things really are quite useful
chadtech 2018-02-22 17:46:38 How would you style a checkbox to look enabled, when it isnt?
norpan 2018-02-22 17:47:25 You’d hide it and replace it with :after content :slightly_smiling_face: :slightly_smiling_face: so yes, not so simple
chadtech 2018-02-22 17:48:11 Ah, cool.
norpan 2018-02-22 17:48:27 You’d probably make your own checkbox element anyway if you care about apperance
grahamc 2018-02-22 17:57:30 take care, though, standard check boxes are accessible and it can be difficult to create a custom, also-accessible checkbox.
norpan 2018-02-22 18:05:32 I think accessibility is out the window if you want it to be enabled but non-clickable :slightly_smiling_face:

Related Questions