pengx17 / logseq-dev-theme

</> Logseq dev theme

Home Page:https://pengx17.github.io/knowledge-garden/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bullet thread broken when block has vertical margin.

SainoNamkho opened this issue · comments

image

.ls-block {
    margin-bottom: 1rem;
}

Sorry, the bullet threading does not work with margin-bottom on blocks. Please try using padding-bottom instead.

Sorry, the bullet threading does not work with margin-bottom on blocks. Please try using padding-bottom instead.

padding-bottom does not collapse, so there will be too much at the end of nested blocks.
I've find an ad-hoc solution

.ls-block .ls-block:focus-within:not(.ls-block:first-of-type) > div > div.items-center::before {
    top: calc(-50% + var(--ls-block-bullet-threading-width) * 0.5 - 1px - 1rem);
}

The -50% + var(--ls-block-bullet-threading-width) * 0.5 - 1px is take from the source code, which actually needs to be at least negative
(current .ls-block).padding-top + (current .ls-block).border-top + (previous .ls-block).border-bottom