Skip to content

Commit 2549a64

Browse files
author
Atsushi Ambo
committed
Fix: GitHub Actions のビルドエラーを修正
- pymdownx.tasklist の設定をGitHub Actions環境と互換性があるように修正 - タスクリストのクラス名をデフォルトのものに合わせて更新 - CSSとJavaScriptを更新してデフォルトのクラス名に対応
1 parent fc24127 commit 2549a64

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

docs/theme/extra.css

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ details.quiz summary:hover {
5353
}
5454

5555
/* Task list styles */
56-
.task-list-item {
57-
list-style: none;
56+
.task-list-item {
57+
list-style: none;
5858
margin-left: -1.5em;
5959
}
6060
.task-list-item input[type="checkbox"] {
@@ -63,7 +63,22 @@ details.quiz summary:hover {
6363
}
6464
.task-list-item input:checked + p,
6565
.task-list-item input:checked + span,
66-
.task-list-item input:checked {
66+
.task-list-item input:checked {
67+
text-decoration: line-through;
68+
opacity: 0.7;
69+
}
70+
71+
/* Support for pymdownx.tasklist default classes */
72+
.task-list-item {
73+
list-style: none;
74+
}
75+
.task-list-item input[type="checkbox"] {
76+
margin: 0 0.5em 0 0;
77+
vertical-align: middle;
78+
}
79+
.task-list-item input:checked + p,
80+
.task-list-item input:checked + span,
81+
.task-list-item input:checked {
6782
text-decoration: line-through;
6883
opacity: 0.7;
6984
}

docs/theme/extra.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
const saved = JSON.parse(localStorage.getItem(STORAGE_KEY) || "{}");
66

77
// Mark saved states
8-
document.querySelectorAll("ul.task-list input[type=checkbox]").forEach((cb, i) => {
8+
document.querySelectorAll("ul.task-list-item input[type=checkbox]").forEach((cb, i) => {
99
cb.checked = saved[i] ?? cb.checked;
1010
cb.addEventListener("change", () => {
1111
saved[i] = cb.checked;

mkdocs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ markdown_extensions:
2828
- pymdownx.tasklist:
2929
custom_checkbox: true
3030
clickable_checkbox: true
31-
class: task-list
3231
- attr_list
3332
- md_in_html
3433

0 commit comments

Comments
 (0)