mirror of https://github.com/usememos/memos.git
Fixes #5248 Complete refactor of task list CSS to follow GitHub's implementation pattern for proper nested checkbox list support: BEFORE (broken approach): - Used flex layout on task list items - Removed all padding with !important overrides - Fought against natural HTML nesting structure - Nested lists didn't indent properly AFTER (GitHub-style approach): - Uses standard block layout (not flex) - Checkboxes positioned with negative margins (-1.4em) - Nested lists inherit proper indentation via natural HTML structure - Top-level lists: padding-left: 0 - Nested lists: padding-left: 1.5em Key changes: 1. Removed flex layout that broke nesting 2. Applied GitHub's checkbox negative margin technique 3. Simplified selectors (removed ul.contains-task-list complexity) 4. Removed unnecessary !important overrides 5. Let CSS cascade naturally with HTML structure Result: Nested markdown like this now renders correctly: - [ ] Parent task - [ ] Child task 1 - [ ] Child task 2 The refactored CSS is also 57 lines shorter and more maintainable. |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .gitignore | ||
| .prettierrc.js | ||
| components.json | ||
| eslint.config.mjs | ||
| index.html | ||
| package.json | ||
| pnpm-lock.yaml | ||
| tsconfig.json | ||
| vite.config.mts | ||