Skip to content

Instantly share code, notes, and snippets.

@gridphp
Created November 7, 2025 07:35
Show Gist options
  • Select an option

  • Save gridphp/c0beb956cd4231465f721026b9d5e3d2 to your computer and use it in GitHub Desktop.

Select an option

Save gridphp/c0beb956cd4231465f721026b9d5e3d2 to your computer and use it in GitHub Desktop.
CSS for disabled checkbox
.jqgrow input[type="checkbox"]:disabled:checked {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
width: 16px;
height: 16px;
border: 2px solid #4CAF50;
border-radius: 3px;
background-color: #4CAF50;
position: relative;
cursor: default;
}
.jqgrow input[type="checkbox"]:disabled:checked::before {
content: "";
position: absolute;
left: 4px;
top: 0px;
width: 3px;
height: 8px;
border: solid white;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
.jqgrow input[type="checkbox"]:disabled:not(:checked) {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
width: 16px;
height: 16px;
border: 2px solid #ddd;
border-radius: 3px;
background: #f5f5f5;
cursor: default;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment