Skip to content

Commit

Permalink
fix(compiler): task lists style, fixed #215
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Nov 29, 2017
1 parent 88df107 commit e43ded4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/render/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/themes/basic/_layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e43ded4

Please sign in to comment.