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
.mobile-note-navigator {
--navigator-group-inset: 16px;
--navigator-group-radius: 6px;
--navigator-group-spacing: 16px;
--navigator-group-background: var(--card-background-color);
--navigator-row-padding: 16px;
--navigator-separator-color: var(--menu-item-delimiter-color);
--navigator-separator-inset: 0px;
--navigator-pressed-background: color-mix(in srgb, var(--main-text-color) 10%, transparent);
--navigator-active-indicator-color: var(--main-text-color);
display: flex;
flex-direction: column;
flex: 1 1 auto;
min-height: 0;
contain: content;
}
.mobile-navigator-toolbar {
display: flex;
align-items: center;
gap: 8px;
padding: 4px 6px;
background: var(--main-background-color);
}
.mobile-navigator-workspaces {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 10px;
margin-inline: var(--navigator-group-inset);
}
.mobile-navigator-workspace {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
min-width: 0;
padding: 16px 8px 12px;
border: 0;
border-radius: var(--navigator-group-radius);
background: var(--navigator-group-background);
color: var(--main-text-color);
font: inherit;
cursor: pointer;
user-select: none;
-webkit-tap-highlight-color: transparent;
&:active {
background-image: linear-gradient(var(--navigator-pressed-background), var(--navigator-pressed-background));
}
}
.mobile-navigator-workspace-icon {
display: grid;
place-items: center;
width: 52px;
height: 52px;
font-size: 2.2em;
}
.mobile-navigator-workspace-title {
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 0.9em;
}
.mobile-navigator-toolbar-button {
display: flex;
flex: 0 1 auto;
align-items: center;
gap: 4px;
min-width: 0;
min-height: 40px;
padding-block: 6px;
padding-inline: 4px 10px;
background: none;
border: none;
color: var(--main-text-color);
font-size: 1em;
font-weight: 500;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.mobile-navigator-toolbar-button:disabled {
cursor: default;
opacity: 0.6;
}
.mobile-navigator-forward {
margin-inline-start: auto;
padding-inline: 10px 4px;
}
.mobile-navigator-toolbar-icon {
flex: 0 0 auto;
font-size: 1.5em;
}
.mobile-navigator-unhoist-icon {
flex: 0 0 auto;
font-size: 1.2em;
}
.mobile-navigator-toolbar-title {
flex: 1 1 auto;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: start;
}
.mobile-navigator-scroll {
position: relative;
flex: 1 1 auto;
overflow-y: auto;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
touch-action: pan-y;
overscroll-behavior: contain;
padding-bottom: calc(var(--navigator-group-spacing) + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
mask-image: linear-gradient(to bottom, transparent, #000 var(--navigator-group-spacing));
}
.mobile-navigator-scroll.is-pending .mobile-navigator-body {
visibility: hidden;
}
.mobile-navigator-placeholder {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.8em;
color: var(--muted-text-color, var(--main-text-color));
pointer-events: none;
}
.mobile-navigator-current-tile,
.mobile-navigator-list {
margin-inline: var(--navigator-group-inset);
border-radius: var(--navigator-group-radius);
background: var(--navigator-group-background);
}
.mobile-navigator-current-tile {
display: flex;
flex-direction: column;
gap: 10px;
padding: 14px var(--navigator-row-padding);
cursor: pointer;
user-select: none;
-webkit-tap-highlight-color: transparent;
color: var(--main-text-color);
}
.mobile-navigator-current-tile:active {
filter: brightness(0.95);
}
.mobile-navigator-current-tile.is-archived {
opacity: 0.7;
}
.mobile-navigator-children-label {
padding: var(--navigator-group-spacing) var(--navigator-group-inset) 6px;
font-size: 0.75em;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--muted-text-color, var(--main-text-color));
opacity: 0.7;
}
.mobile-navigator-current-header {
display: flex;
align-items: center;
gap: 10px;
min-height: 32px;
}
.mobile-navigator-current-icon {
flex: 0 0 auto;
font-size: 1.3em;
}
.mobile-navigator-title-group {
display: flex;
flex: 1 1 auto;
align-items: center;
gap: 6px;
min-width: 0;
}
.mobile-navigator-indicator {
flex: 0 0 auto;
color: var(--muted-text-color, var(--main-text-color));
opacity: 0.8;
&.clone-indicator {
opacity: 0.5;
}
}
.mobile-navigator-current-title {
flex: 0 1 auto;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 1.15em;
font-weight: 600;
}
.mobile-navigator-current-action {
flex: 0 0 auto;
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
padding: 0;
border: none;
border-radius: 50%;
background: transparent;
color: inherit;
font-size: 1.2em;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.mobile-navigator-current-action:active {
background: var(--hover-item-background-color);
}
.mobile-navigator-current-open {
display: flex;
align-items: center;
align-self: flex-end;
gap: 2px;
color: var(--main-text-color);
font-weight: 500;
}
.mobile-navigator-current-preview {
position: relative;
font-size: 0.92em;
line-height: 1.35;
color: var(--muted-text-color, var(--main-text-color));
pointer-events: none;
}
/* Constrain height on the inner `.note-book-content` itself — that's the element
watched by the shared `contentSizeObserver`, so `scrollHeight > clientHeight`
there is what toggles `note-book-content-overflowing`. */
.mobile-navigator-current-preview .note-book-content {
max-height: 140px;
overflow: hidden;
}
/* Hide stale content during the brief window between commit and the new content
being rendered into the DOM, so the preview doesn't flash the previous note's
content before the new one arrives. */
.mobile-navigator-current-preview .note-book-content:not(.note-book-content-ready) {
visibility: hidden;
}
/* Mirror NoteList's approach: a mask gradient applied only when
`.note-book-content-overflowing` is toggled on by the shared
`contentSizeObserver` in ListOrGridView.tsx (scrollHeight > clientHeight).
This fades the bottom only when the preview is actually truncated. */
.mobile-navigator-current-preview .note-book-content.note-book-content-overflowing {
mask-image: linear-gradient(to bottom, black calc(100% - 32px), transparent 100%);
mask-repeat: no-repeat;
mask-size: 100% 100%;
}
.mobile-navigator-current-preview:empty,
.mobile-navigator-current-preview .note-book-content:empty {
display: none;
}
/* Collapse the whole preview (and its flex gap) when the rendered content is empty,
so pure folders don't show a blank row beneath the title. */
.mobile-navigator-current-tile:has(.mobile-navigator-preview-slot:not([hidden]) > .note-book-content-ready:empty) .mobile-navigator-current-preview {
display: none;
}
.mobile-navigator-current-preview .note-book-content {
max-width: 100%;
}
.mobile-navigator-current-preview img,
.mobile-navigator-current-preview video {
max-width: 100%;
height: auto;
}
.mobile-navigator-list {
display: flex;
flex-direction: column;
overflow: hidden;
}
.mobile-navigator-current-tile + .mobile-navigator-list {
margin-block-start: var(--navigator-group-spacing);
}
.mobile-navigator-row {
position: relative;
display: flex;
align-items: center;
gap: 12px;
min-height: 48px;
padding: 10px var(--navigator-row-padding);
color: var(--main-text-color);
cursor: pointer;
user-select: none;
-webkit-tap-highlight-color: transparent;
&:not(:last-of-type)::after {
content: "";
position: absolute;
inset-block-end: 0;
inset-inline: var(--navigator-separator-inset) 0;
height: 1px;
background: var(--navigator-separator-color);
}
}
.mobile-navigator-row:active {
background: var(--navigator-pressed-background);
}
.mobile-navigator-row.is-active::before {
content: "";
position: absolute;
inset-block: 0;
inset-inline-start: 0;
width: 3px;
background: var(--navigator-active-indicator-color);
}
.mobile-navigator-row.is-archived {
opacity: 0.55;
}
.mobile-navigator-row.is-spotlighted .mobile-navigator-row-title {
font-style: italic;
}
/* Colored notes: `--custom-color` is set by the theme on `.use-note-color`
(see css_class_manager.createClassForColor). Apply it to the title/icon. */
.mobile-navigator-unhoist.use-note-color,
.mobile-navigator-workspace-icon.use-note-color,
.mobile-navigator-row.use-note-color .mobile-navigator-row-title,
.mobile-navigator-row.use-note-color .mobile-navigator-row-icon,
.mobile-navigator-current-tile.use-note-color .mobile-navigator-current-title,
.mobile-navigator-current-tile.use-note-color .mobile-navigator-current-icon {
color: var(--custom-color, inherit);
}
.mobile-navigator-row.is-pending {
cursor: progress;
}
.mobile-navigator-row-icon {
flex: 0 0 auto;
font-size: 1.2em;
}
.mobile-navigator-row-icon.is-protected,
.mobile-navigator-current-icon.is-protected {
position: relative;
&::after {
position: absolute;
inset-block-end: 0;
inset-inline-end: 0;
font-family: "boxicons";
font-size: 0.7em;
content: "\eb4a";
transform: translateX(25%);
color: var(--quick-search-result-highlight-color);
background:
linear-gradient(var(--navigator-group-background) 0 0),
var(--navigator-backdrop, var(--main-background-color));
border-radius: 50%;
}
}
body[dir=rtl] :is(.mobile-navigator-row-icon, .mobile-navigator-current-icon).is-protected::after {
transform: translateX(-25%);
}
.mobile-navigator-title-group .is-locked {
font-style: italic;
opacity: 0.75;
}
.mobile-navigator-row-title {
flex: 0 1 auto;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 1em;
}
.mobile-navigator-row-chevron {
flex: 0 0 auto;
font-size: 1.4em;
opacity: 0.5;
}
.mobile-navigator-row-count {
flex: 0 0 auto;
color: var(--muted-text-color, var(--main-text-color));
font-variant-numeric: tabular-nums;
}
.mobile-navigator-row-hidden-badge {
flex: 0 0 auto;
min-width: 1.6em;
padding: 2px 8px;
border-radius: 999px;
background: var(--accented-background-color, var(--hover-item-background-color));
color: var(--muted-text-color, var(--main-text-color));
font-size: 0.75em;
font-weight: 600;
text-align: center;
line-height: 1.2;
}