feat(task-lists): add support for "Important Checked" task (#734)

This commit is contained in:
Cell
2026-04-19 05:00:09 +08:00
committed by GitHub
parent 4982231d5f
commit 9ada69ed71
24 changed files with 59 additions and 18 deletions
@@ -26,6 +26,7 @@ This post tests the rendering of task lists in Markdown.
- [<] Scheduled Task
- [>] Rescheduled Task
- [!] Important Task
- [!x] Important Checked Task
- [?] Question Task
- Regular list item
@@ -43,6 +44,7 @@ This post tests the rendering of task lists in Markdown.
- [<] Scheduled Task
- [>] Rescheduled Task
- [!] Important Task
- [!x] Important Checked Task
- [?] Question Task
## Mixed Content in List Items
+2
View File
@@ -0,0 +1,2 @@
@import 'rgba';
@import 'var';
+8
View File
@@ -0,0 +1,8 @@
/// Build an rgba-like color from any source color expression.
/// @param {Color | String} $color - Source color, supports CSS vars such as fixit-var(secondary).
/// @param {Number} $alpha [1] - Alpha channel value in range 0..1.
/// @example
/// color: fixit-rgba(fixit-var(secondary), 0.2);
@function fixit-rgba($color, $alpha: 1) {
@return unquote("rgb(from #{$color} r g b / #{$alpha})");
}
+14
View File
@@ -0,0 +1,14 @@
/// Get CSS variable with prefix
/// @param {String} $name - CSS variable name (without prefix)
/// @param {*} $fallback - Optional fallback value
/// @return {String} - Complete CSS variable reference
/// @example
/// color: fixit-var(global-font-color);
/// background: fixit-var(custom-bg, #fff);
@function fixit-var($name, $fallback: null) {
@if $fallback {
@return var(#{$rootPrefix}#{$name}, #{$fallback});
} @else {
@return var(#{$rootPrefix}#{$name});
}
}
+1
View File
@@ -1,3 +1,4 @@
@import "_function";
@import "_mixin";
@import "_base";
@import "_common";
-15
View File
@@ -2,21 +2,6 @@
// Theme Variable Mixins and Functions
// ========================================
/// Get CSS variable with prefix
/// @param {String} $name - CSS variable name (without prefix)
/// @param {*} $fallback - Optional fallback value
/// @return {String} - Complete CSS variable reference
/// @example
/// color: fixit-var(global-font-color);
/// background: fixit-var(custom-bg, #fff);
@function fixit-var($name, $fallback: null) {
@if $fallback {
@return var(#{$rootPrefix}#{$name}, #{$fallback});
} @else {
@return var(#{$rootPrefix}#{$name});
}
}
/// Set a single CSS variable
/// @param {String} $name - CSS variable name (without prefix)
/// @param {*} $value - Variable value
+12 -1
View File
@@ -241,6 +241,16 @@
color: fixit-var(task-text-color);
}
}
&[data-task='x'] {
@include task-icon {
background-color: fixit-rgba(fixit-var(secondary), 0.2);
mask-image: linear-gradient(#000, #000);
mask-size: 0.875em 0.875em;
mask-repeat: no-repeat;
mask-position: center;
};
}
&[data-task='-'] {
@include task-icon {
@@ -257,7 +267,8 @@
@include task-text(fixit-var(success));
}
&[data-task='!'] {
&[data-task='!'],
&[data-task='!x'] {
@include task-icon(fixit-var(danger));
}
+1
View File
@@ -208,6 +208,7 @@ x = "Überprüft"
"<" = "Geplant"
">" = "Verschoben"
"!" = "Wichtig"
"!x" = "Wichtig Erledigt"
"?" = "Frage"
# === Task lists ===
+1
View File
@@ -208,6 +208,7 @@ x = "Checked"
"<" = "Scheduled"
">" = "Rescheduled"
"!" = "Important"
"!x" = "Important Checked"
"?" = "Question"
# === Task lists ===
+1
View File
@@ -208,6 +208,7 @@ x = "Verificado"
"<" = "Programado"
">" = "Reprogramado"
"!" = "Importante"
"!x" = "Importante Verificado"
"?" = "Pregunta"
# === Task lists ===
+1
View File
@@ -208,6 +208,7 @@ x = "Vérifié"
"<" = "Planifié"
">" = "Replanifié"
"!" = "Important"
"!x" = "Important Vérifié"
"?" = "Question"
# === Task lists ===
+1
View File
@@ -209,6 +209,7 @@ x = "जांच की गई"
"<" = "अनुसूचित"
">" = "पुनः अनुसूचित"
"!" = "महत्वपूर्ण"
"!x" = "महत्वपूर्ण सत्यापित"
"?" = "सवाल"
# === Task lists ===
+1
View File
@@ -208,6 +208,7 @@ x = "Verificato"
"<" = "Programmato"
">" = "Ripianificato"
"!" = "Importante"
"!x" = "Importante Verificato"
"?" = "Domanda"
# === Task lists ===
+1
View File
@@ -204,6 +204,7 @@ x = "完了"
"<" = "予定"
">" = "再予定"
"!" = "重要"
"!x" = "重要・確認済み"
"?" = "問題"
# === Task lists ===
+1
View File
@@ -204,6 +204,7 @@ x = "완료"
"<" = "계획됨"
">" = "다시 계획됨"
"!" = "중요"
"!x" = "중요 확인됨"
"?" = "문제"
# === Task lists ===
+1
View File
@@ -208,6 +208,7 @@ x = "Zweryfikowane"
"<" = "Zaplanowane"
">" = "Przełożone"
"!" = "Ważne"
"!x" = "Ważne Sprawdzone"
"?" = "Pytanie"
# === Task lists ===
+1
View File
@@ -209,6 +209,7 @@ x = "Verificado"
"<" = "Agendado"
">" = "Reagendado"
"!" = "Importante"
"!x" = "Importante Verificado"
"?" = "Dúvida"
# === Task lists ===
+1
View File
@@ -208,6 +208,7 @@ x = "Controlat"
"<" = "Programat"
">" = "Reprogramat"
"!" = "Important"
"!x" = "Important Verificat"
"?" = "Întrebare"
# === Task lists ===
+1
View File
@@ -208,6 +208,7 @@ x = "Проверено"
"<" = "Запланировано"
">" = "Перенесено"
"!" = "Важно"
"!x" = "Важно Проверено"
"?" = "Вопрос"
# === Task lists ===
+1
View File
@@ -208,6 +208,7 @@ x = "Проверено"
"<" = "Планирано"
">" = "Преустановљено"
"!" = "Важно"
"!x" = "Важно Проверено"
"?" = "Питање"
# === Task lists ===
+1
View File
@@ -207,6 +207,7 @@ x = "Đã kiểm tra"
"<" = "Đã lên lịch"
">" = "Đã lên lịch lại"
"!" = "Quan trọng"
"!x" = "Quan trọng Đã kiểm tra"
"?" = "Câu hỏi"
# === Task lists ===
+1
View File
@@ -204,6 +204,7 @@ x = "已完成"
"<" = "已计划"
">" = "已重新计划"
"!" = "重要"
"!x" = "重要已核验"
"?" = "问题"
# === Task lists ===
+1
View File
@@ -204,6 +204,7 @@ x = "已完成"
"<" = "已計劃"
">" = "已重新計劃"
"!" = "重要"
"!x" = "重要已核驗"
"?" = "問題"
# === Task lists ===
+4 -2
View File
@@ -3,12 +3,13 @@
{{- $iconMap := dict
" " "fa-regular fa-square"
"x" "fa-solid fa-check-square"
"x" "fa-regular fa-check-square"
"/" "fa-regular fa-square"
"-" "fa-solid fa-square-xmark"
"<" "fa-regular fa-calendar-plus"
">" "fa-regular fa-calendar-minus"
"!" "fa-solid fa-circle-exclamation"
"!" "fa-regular fa-star"
"!x" "fa-solid fa-star"
"\\?" "fa-regular fa-circle-question"
-}}
{{- /* Custom Task lists */ -}}
@@ -41,6 +42,7 @@
- [<] Scheduled
- [>] Rescheduled
- [!] Important
- [!x] Important Checked
- [?] Question
*/ -}}
{{- range $extendedSigns -}}