Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
html {
--page-top-spacing: 2rem;
}
/* Past 90rem the navigation pane widens into the space beside the layout, up to 24rem, and the
layout widens by twice as much to keep the content centered. The pane spans the full width and
centers the layout with its start padding; `#toc-pane` fills the space after the layout. */
#split-pane {
--left-pane-width: clamp(min(18rem, 25vw), 18rem + (100vw - 90rem) / 2, 24rem);
--left-pane-growth: max(0rem, var(--left-pane-width) - 18rem);
--layout-width: calc(90rem + 2 * var(--left-pane-growth));
display: flex;
flex-direction: row;
padding-inline-start: max(0px, (100% - var(--layout-width)) / 2);
}
#split-pane:has(#content.full-content-width) {
padding-inline-start: 0;
}
#left-pane {
display: flex;
flex-direction: column;
min-width: 0;
width: var(--left-pane-width);
height: 100vh;
border-inline-end: 1px solid var(--background-highlight);
background: var(--tree-background);
justify-content: flex-start;
position: sticky;
top: 0;
overflow-y: auto;
flex-shrink: 0;
}
/* Extends the pane's background to the edge of the window when the layout is narrower than it. */
@media not all and (max-width: 48em) {
#left-pane {
box-shadow: -100vw 0 0 100vw var(--tree-background);
clip-path: inset(0 0 0 -100vw);
}
#left-pane:dir(rtl) {
box-shadow: 100vw 0 0 100vw var(--tree-background);
clip-path: inset(0 -100vw 0 0);
}
}
#right-pane {
flex: 1;
min-width: 0;
position: relative;
display: flex;
flex-direction: row;
align-items: flex-start;
}
#main {
order: 2;
flex: 1;
min-width: 0;
overflow-x: auto;
padding: var(--page-top-spacing) 20px;
width: 100%;
}
@media (min-width: 1200px) {
#main {
padding: var(--page-top-spacing) 50px;
}
}
/* A text note reads at a limited width, as in the app, unless it has `#fullContentWidth`. */
#content.ck-content:not(.full-content-width),
#content.ck-content:not(.full-content-width) ~ * {
max-width: 48rem;
margin-inline: auto;
}
#mobile-backdrop {
display: none;
}
@media (max-width: 48em) {
html {
scroll-padding-top: var(--header-height);
}
body:is(.menu-open, .toc-open) {
overflow: hidden;
}
#right-pane, #main {
width: 100%;
padding: 0;
}
#main {
padding: 1.5rem 1rem 1rem;
}
#left-pane {
position: fixed;
top: 0;
bottom: 0;
left: 0;
width: 80%;
max-width: 300px;
height: auto;
transform: translateX(-100%);
transition: transform 200ms ease;
z-index: 2;
overflow-y: auto;
}
.menu-open #left-pane {
transform: translateX(0);
}
#mobile-backdrop {
display: block;
position: fixed;
inset: 0;
background: rgba(0,0,0,0);
pointer-events: none;
transition: background-color 200ms ease;
z-index: 1;
}
body.menu-open #mobile-backdrop,
body.toc-open #mobile-backdrop {
background: rgba(0,0,0, 0.6);
pointer-events: auto;
}
}