feat(editor): center inline image rows by default via CSS :has() #295
Reference in New Issue
Block a user
Delete Branch "image-inline-center"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #284: rows of inline images were pinned left while a single image defaults to centered.
A row has no DOM wrapper (each image is an independent block node), so its placement is controlled by the
text-alignof the nearest block ancestor. The new rules inmedia.cssenabletext-align: centeronly on containers that actually hold a direct inline-image child (:has), and reset every other child back tostartso ordinary text is unaffected. Toolbar per-block alignment (inline style) still wins; browsers without:has()keep the previous start-pinned rows.Also includes a docs sweep commit (CHANGELOG entries for recent features + README updates).
Verification: editor-ext tests 247/247; review pass APPROVE — audited all
text-alignrules (math block is wrapped in.react-renderer, so it keeps its own centering — verified in happy-dom); read-only/share view uses the same stylesheet.Merged on the owner's explicit instruction.