editor: fix icons not aligning in outline,task,check lists & callouts because of custom line height

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
This commit is contained in:
01zulfi
2026-01-07 13:50:02 +05:00
parent d19c5b9775
commit e0c31d6fdd
2 changed files with 7 additions and 7 deletions

View File

@@ -93,7 +93,7 @@ export function TaskItemComponent(
cursor: "grab", cursor: "grab",
mr: "0.2rem", mr: "0.2rem",
fontFamily: "inherit", fontFamily: "inherit",
marginTop: "0.065rem" marginTop: "calc((1lh - 18px) / 2)"
}} }}
size={isMobile ? "2.46ch" : "2.22ch"} size={isMobile ? "2.46ch" : "2.22ch"}
/> />
@@ -117,7 +117,7 @@ export function TaskItemComponent(
borderColor: "accent" borderColor: "accent"
}, },
fontFamily: "inherit", fontFamily: "inherit",
marginTop: "0.13rem" marginTop: "calc((1lh - 16px) / 2)"
}} }}
onMouseDown={(e) => { onMouseDown={(e) => {
if (globalThis.keyboardShown) { if (globalThis.keyboardShown) {
@@ -155,7 +155,7 @@ export function TaskItemComponent(
bg: "background", bg: "background",
opacity: 0, opacity: 0,
alignSelf: "flex-start", alignSelf: "flex-start",
marginTop: "0.16rem" marginTop: "calc((1lh - 14px) / 2)"
}} }}
> >
{editor.isEditable && ( {editor.isEditable && (

View File

@@ -604,7 +604,7 @@ p > *::selection {
.outline-list > li::before { .outline-list > li::before {
position: absolute; position: absolute;
top: 0px; top: calc((1lh - 18px) / 2);
cursor: pointer; cursor: pointer;
content: ""; content: "";
background-size: 18px; background-size: 18px;
@@ -729,7 +729,7 @@ p > *::selection {
.simple-checklist > li::after { .simple-checklist > li::after {
position: absolute; position: absolute;
top: 0px; top: calc((1lh - 18px) / 2);
cursor: pointer; cursor: pointer;
content: ""; content: "";
background-size: 18px; background-size: 18px;
@@ -747,7 +747,7 @@ p > *::selection {
.simple-checklist > li.checked::before { .simple-checklist > li.checked::before {
position: absolute; position: absolute;
top: 2px; top: calc((1lh - 14px) / 2);
cursor: pointer; cursor: pointer;
content: ""; content: "";
background-size: 18px; background-size: 18px;
@@ -790,7 +790,7 @@ p > *::selection {
.ProseMirror div.callout > :first-child::after { .ProseMirror div.callout > :first-child::after {
position: absolute; position: absolute;
top: 0px; top: calc((1lh - 18px) / 2);
right: 0px; right: 0px;
cursor: pointer; cursor: pointer;
content: ""; content: "";