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
/*
* Adds no box of its own, so the pages fill whatever the caller already positioned them against
* rather than a wrapper that would inset them by its own padding.
*/
.slide-pages {
display: contents;
}
.slide-page {
position: absolute;
inset: 0;
}
/*
* Pages that keep their place in the flow, so the container is as tall as whatever is arriving
* rather than as tall as it was told to be. Only the page leaving is lifted out, since two pages in
* the flow at once would stack into the height of both.
*/
.slide-pages-in-flow {
display: block;
position: relative;
/*
* The page on its way out is translated a full width sideways, which would otherwise reach past
* the container and give the scrolling ancestor something to scroll to. Anything that then asks
* to be revealed, a field taking focus most of all, scrolls the whole screen sideways mid-slide.
*/
overflow: clip;
> .slide-page {
position: static;
}
> .slide-page.slide-out-forward,
> .slide-page.slide-out-backward {
position: absolute;
inset: 0 0 auto;
}
}
.slide-out-forward,
.slide-out-backward,
.slide-in-forward,
.slide-in-backward {
animation-duration: 0.35s;
animation-timing-function: ease-in-out;
animation-fill-mode: forwards;
}
.slide-out-forward {
animation-name: tn-slide-out-to-left;
}
.slide-out-backward {
animation-name: tn-slide-out-to-right;
}
.slide-in-forward {
animation-name: tn-slide-in-from-right;
}
.slide-in-backward {
animation-name: tn-slide-in-from-left;
}
body[dir=rtl] .slide-out-forward {
animation-name: tn-slide-out-to-right;
}
body[dir=rtl] .slide-out-backward {
animation-name: tn-slide-out-to-left;
}
body[dir=rtl] .slide-in-forward {
animation-name: tn-slide-in-from-left;
}
body[dir=rtl] .slide-in-backward {
animation-name: tn-slide-in-from-right;
}