mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Always load browser default checkbox
This commit is contained in:
@@ -866,7 +866,7 @@ div.post-content .table-wrapper {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
// attribute 'hide-bullet' added by JS
|
||||
// attribute 'hide-bullet' was added by liquid
|
||||
.task-list-item[hide-bullet] {
|
||||
list-style-type: none;
|
||||
|
||||
@@ -898,10 +898,12 @@ div.post-content .table-wrapper {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // .task-list-item
|
||||
|
||||
input[type=checkbox] {
|
||||
display: none;
|
||||
margin: 0 .5rem .2rem -1.3rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
} // ul
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
*/
|
||||
|
||||
$(function() {
|
||||
/* hide bullet of checkbox item */
|
||||
$("li.task-list-item:has(input)").attr("hide-bullet", "");
|
||||
/* hide browser default checkbox */
|
||||
$("input[type=checkbox]").addClass("unloaded");
|
||||
/* create checked checkbox */
|
||||
$("input[type=checkbox][checked=checked]").before("<span checked></span>");
|
||||
$("input[type=checkbox][checked]").before("<span checked></span>");
|
||||
/* create normal checkbox */
|
||||
$("input[type=checkbox]:not([checked=checked])").before("<span></span>");
|
||||
$("input[type=checkbox]:not([checked])").before("<span></span>");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user