Add different styling for all unordered lists that have checkboxes

These checkboxes are generated through the GFM tasklist extension.
In this case there should be not list item and the padding-left
should be removed.
This commit is contained in:
Paul van Tilburg 2017-12-30 16:14:52 +01:00
parent e795544dc3
commit af3a6183a5
4 changed files with 15 additions and 2 deletions

View File

@ -12,6 +12,11 @@ body {
padding-left: 1.2rem;
}
.list-html ul.tasklist {
list-style-type: none;
padding-left: 0;
}
// On medium screens and up, use two columns
.card-columns {
@include media-breakpoint-down(sm) {

View File

@ -6469,6 +6469,10 @@ body {
.list-html ol {
padding-left: 1.2rem; }
.list-html ul.tasklist {
list-style-type: none;
padding-left: 0; }
@media (max-width: 767.99px) {
.card-columns {
column-count: 1; } }

File diff suppressed because one or more lines are too long

View File

@ -70,7 +70,11 @@ function updateListHTML(listElem) {
url: '/lists/' + listId,
headers: { 'Accept': 'text/html' }
}).done(function(html) {
$('.list-html', listElem).html(html);
var listHtmlElem = $('.list-html', listElem)
listHtmlElem.html(html);
$("ul > li", listHtmlElem).has('input[type="checkbox"]')
.parent()
.addClass("tasklist");
});
}