mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
fix(compiler): task lists style, fixed #215
This commit is contained in:
parent
88df107c70
commit
e43ded4ea7
@ -181,7 +181,7 @@ export class Compiler {
|
||||
if (checked) {
|
||||
text = text.replace(CHECKED_RE, `<input type="checkbox" ${checked[1] === 'x' ? 'checked' : ''} />`)
|
||||
}
|
||||
return `<li>${text}</li>\n`
|
||||
return `<li${checked ? ` class="task-list-item"` : ''}>${text}</li>\n`
|
||||
}
|
||||
|
||||
renderer.origin = origin
|
||||
|
||||
@ -91,6 +91,10 @@ kbd {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.task-list-item {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
li input[type=checkbox] {
|
||||
margin: 0 0.2em 0.25em -1.6em;
|
||||
vertical-align: middle;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user