1
0
Fork 0
mirror of https://github.com/SeriousBug/dotfiles synced 2025-02-22 14:19:53 -06:00
dotfiles/logseq/plugins/logseq-dev-theme/bullet_threading.css
2023-01-26 23:45:42 -05:00

143 lines
3.6 KiB
CSS

:root {
--ls-block-bullet-active-color: var(
--ls-block-bullet-threading-active-color-overwrite,
var(--ls-link-text-color)
);
--ls-block-bullet-threading-width: var(
--ls-block-bullet-threading-width-overwrite,
1px
);
}
.block-control {
z-index: 1;
}
.block-children {
border-left-color: var(--ls-guideline-color);
border-left-width: var(--ls-block-bullet-threading-width) !important;
}
.block-children-container {
position: relative;
}
.block-children-left-border {
z-index: 1;
position: absolute;
height: 100%;
width: 4px;
padding-right: 0px;
border-radius: 2px;
background-color: transparent;
left: -1px;
transition: background-color 0.2s;
}
.block-children-left-border:hover {
background-color: var(--ls-block-bullet-active-color);
}
.block-content-wrapper {
position: relative;
overflow-x: visible !important;
/* Fixme: overflow? */
}
.bullet-container {
height: 14px !important;
width: 14px !important;
position: relative;
transform: translate(1px, -1px);
}
/* Block bullet path should only show in a nested block */
.ls-block {
/* Fix for headings like h1, h2 etc */
/* Basic "curve" */
/* Fix multi-line blocks with children */
}
.ls-block .bullet {
background-color: var(--ls-block-bullet-active-color);
box-shadow: 0 0 0 1px var(--ls-block-bullet-active-color);
}
.ls-block div.items-center {
position: relative;
height: 26px !important;
}
.ls-block > .items-baseline {
align-items: initial;
}
.ls-block:not(:focus-within) .bullet {
background-color: var(--ls-block-bullet-color);
transform: scale(1);
box-shadow: none;
}
.ls-block:not(:focus-within) > .items-baseline {
align-items: baseline;
}
.ls-block .ls-block > div > div.items-center::before {
pointer-events: none;
content: "";
left: calc(var(--ls-block-bullet-threading-width) * -1);
right: 6px;
top: calc(-50% + var(--ls-block-bullet-threading-width) * 0.5 - 1px);
bottom: 50%;
/* shift left 1px for border */
position: absolute;
border-left: var(--ls-block-bullet-threading-width) solid transparent;
border-bottom: var(--ls-block-bullet-threading-width) solid transparent;
border-bottom-left-radius: 10px;
}
.ls-block .ls-block:focus-within > div > div.items-center::before {
border-color: var(--ls-block-bullet-active-color);
}
.ls-block .block-children > .ls-block::before {
pointer-events: none;
content: "";
top: -1rem;
bottom: 0;
border-left: var(--ls-block-bullet-threading-width) solid transparent;
left: calc(var(--ls-block-bullet-threading-width) * -1);
position: absolute;
}
.ls-block .block-children:focus-within > .ls-block:not(:focus-within)::before {
border-color: var(--ls-block-bullet-active-color);
}
.ls-block .block-children:focus-within > .ls-block:focus-within ~ .ls-block::before {
border-color: transparent;
}
.ls-block[haschild] > div > .block-content-wrapper::before {
pointer-events: none;
content: "";
top: 12px;
bottom: 0;
left: -15px;
position: absolute;
border-left: var(--ls-block-bullet-threading-width) solid transparent;
}
.ls-block[haschild]:focus-within > div > .block-content-wrapper::before {
border-color: var(--ls-block-bullet-active-color);
}
:is(.embed-block > div, .embed-page) > div > div > div > div.ls-block > div > div.items-center::before {
border-color: transparent !important;
}
@media (max-width: 640px) {
.ls-block[haschild] > div > .block-content-wrapper::before {
left: -11px;
}
}
/* Disable for doc mode */
.doc-mode div.items-center::before,
.doc-mode div.items-center::after,
.doc-mode .ls-block::before,
.doc-mode .ls-block::after {
display: none;
}
.doc-mode .block-children {
border-left-width: 0px !important;
}