-
Notifications
You must be signed in to change notification settings - Fork 42
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
Allow users to set individual checkbox colors via the API #26
Comments
There a couple of ways we could do this:
Option 2 is what I did for the docs site to normalize the styles across browsers (it uses It might be nice to make a little color plugin to do this. In the mean time, it would probably be easiest to add your own stylesheet like the one in option 2. |
Option 2 would not allow to have different checkbox with multiple colors, right? E.g. a snake example with a green snake and red "apples". What I was curious about is to have multiple colors in the same grid. Also, my JS skills are minimal so my interest right now is to consume the api using Nim's JS FFI :). This regardless of the color, which I think is an interesting issue to raise anyway. Great work by the way, loving checkboxland! |
Ohh, I see. Yeah, I've thought bit about supporting different colors on individual checkboxes ever since I saw this example my coworker made with a forked version of Checkboxland. I doubt you would be able to do this with a plugin, since it would require altering the core API. We'd need to change the checkbox data (from a simple // maybe something like this
{
state: 1,
color: "#ff0000"
} It's doable, though it would add complexity. My bigger concern is that it could kind of takes away from the 1-bit, binary, checkboxy-ness of the library. I think for now, I'd prefer to leave it as-is, but I'll just leave this issue open in case anyone else wants to weigh in. |
ah, yes, I did not see that example, nice! I do agree that checkboxland is probably better off without this, but I guess it also does not hurt to have this discussion open to see that this was taken into account. Thanks again and have a good day! |
not sure if this could be doable with a plug-in, but it was harder than I expected to find an answer that tells me how to change color of the checkbox.
Apparently the key property is
accent-color
: https://stackoverflow.com/questions/4148499/how-to-style-a-checkbox-using-css/58570835#58570835The text was updated successfully, but these errors were encountered: