Vertically center task list checkboxes with first line#431
Conversation
…t line Center the checkbox against the first line of text instead of pinning it near the top of the flex line box. The label now matches the text's first-line height (1.6em) and centers its checkbox, and the task item's paragraph margin is zeroed so the checkbox and text share the same top. Keeps flex-start on the li so the checkbox stays on the first line for wrapped, multi-line items. Also bumps caniuse-lite (browserslist DB) to 1.0.30001800.
Greptile SummaryThis PR fixes a visual alignment bug in the coaching-notes TipTap editor where task-list checkboxes sat above the optical centre of their text line. The fix replaces a
Confidence Score: 5/5Safe to merge — the change is scoped entirely to CSS for a single editor widget and has no JS/TypeScript surface. The CSS math is correct: height:1.6em on a flex label correctly centres the checkbox within one text line, and p { margin:0 } in the task-item div prevents the paragraph from adding unwanted top spacing. Specificity overrides chain as expected. The only note is that the 1.6em value is silently coupled to line-height: 1.6 elsewhere in the file — a one-line comment would protect against drift. No files require special attention beyond the minor comment suggestion on src/styles/simple-editor.scss. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
LI["li\ndisplay: flex\nalign-items: flex-start\ngap: 0.5rem"]
LABEL["label (flex-shrink: 0)\ndisplay: flex\nalign-items: center\nheight: 1.6em"]
CB["input[type=checkbox]\nmargin: 0\naccent-color: var(--editor-focus-border)"]
DIV["div (flex: 1)"]
P["p\nmargin: 0 ← NEW"]
LI --> LABEL
LI --> DIV
LABEL --> CB
DIV --> P
style LABEL fill:#d1fae5,stroke:#059669
style P fill:#d1fae5,stroke:#059669
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
LI["li\ndisplay: flex\nalign-items: flex-start\ngap: 0.5rem"]
LABEL["label (flex-shrink: 0)\ndisplay: flex\nalign-items: center\nheight: 1.6em"]
CB["input[type=checkbox]\nmargin: 0\naccent-color: var(--editor-focus-border)"]
DIV["div (flex: 1)"]
P["p\nmargin: 0 ← NEW"]
LI --> LABEL
LI --> DIV
LABEL --> CB
DIV --> P
style LABEL fill:#d1fae5,stroke:#059669
style P fill:#d1fae5,stroke:#059669
Reviews (1): Last reviewed commit: "fix(coaching-notes): vertically center t..." | Re-trigger Greptile |
Description
Fixes a visual alignment bug in the coaching session Notes editor: checkbox (task list) bullets were vertically off-center, with the checkbox sitting above the optical center of its text line.
GitHub Issue: Fixes #432
Changes
display: flex; align-items: centerand a1.6emheight matching the editor's text line-height (replaces the priormargin-topnudge).align-items: flex-starton theliso the checkbox stays on the first line for wrapped, multi-line items.caniuse-lite(browserslist DB) to1.0.30001800.Screenshots / Videos Showing UI Changes
A before/after of the Notes editor task list would be helpful — checkbox aligned with the first line of both single- and multi-line items.
Testing Strategy
Open a coaching session's Notes editor, add a task/checkbox list with both short and long (wrapping) items, and verify each checkbox is vertically centered on the first line of its text.