Skip to content

Build your personal knowledge base with Trilium Notes

837 B
Raw Blame
/*
 * An aligned list item shrinks to its text and moves to that side, so that its marker or to-do
 * checkbox stays next to the text. The selectors match the `style` that `TableCellProperties`
 * writes on a cell, and the class that `ListItemAlignment` (in the editor) and
 * `applyListItemAlignment()` (elsewhere) put on an item whose first paragraph is aligned.
 */
.ck-content {
    :is(td, th)[style*="text-align:center"] li,
    li.trilium-list-item-aligned-center {
        width: fit-content;
        margin-inline: auto;
    }

    :is(td, th)[style*="text-align:right"] li,
    li.trilium-list-item-aligned-right {
        width: fit-content;
        margin-left: auto;
    }

    :is(td, th)[style*="text-align:left"] li,
    li.trilium-list-item-aligned-left {
        width: fit-content;
        margin-right: auto;
    }
}