Skip to content

Build your personal knowledge base with Trilium Notes

fix(layout): title row background in settings

Elian Doran5d59c953c2ee
diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.css
index 5d0a6476de..9843490929 100644
--- a/apps/client/src/stylesheets/style.css
+++ b/apps/client/src/stylesheets/style.css
@@ -2564,5 +2564,4 @@ body.desktop .title-row {
height: 50px;
min-height: 50px;
align-items: center;
- background: var(--note-split-background-color, var(--main-background-color));
}
diff --git a/apps/client/src/widgets/containers/content_header.css b/apps/client/src/widgets/containers/content_header.css
index 060abde126..b264f5ae9d 100644
--- a/apps/client/src/widgets/containers/content_header.css
+++ b/apps/client/src/widgets/containers/content_header.css
@@ -1,11 +1,16 @@
.content-header-widget {
position: relative;
z-index: 8;
+ background-color: var(--main-background-color);
+}
+
+.note-split.bgfx .content-header-widget {
+ background-color: transparent;
}
.content-header-widget.floating {
position: sticky;
top: 0;
z-index: 11;
- background-color: var(--main-background-color, #fff);
+ background-color: var(--main-background-color, #fff) !important;
}
diff --git a/apps/client/src/widgets/containers/content_header.ts b/apps/client/src/widgets/containers/content_header.ts
index 32b2d13a4b..cc2a3623fe 100644
--- a/apps/client/src/widgets/containers/content_header.ts
+++ b/apps/client/src/widgets/containers/content_header.ts
@@ -47,7 +47,9 @@ export default class ContentHeader extends Container<BasicWidget> {
const isScrollingUp = currentScrollTop < this.previousScrollTop;
const hasMovedEnough = Math.abs(currentScrollTop - this.previousScrollTop) > this.scrollThreshold;
- if (hasMovedEnough) {
+ if (currentScrollTop === 0) {
+ this.setFloating(false);
+ } else if (hasMovedEnough) {
this.setFloating(isScrollingUp);
}
this.previousScrollTop = currentScrollTop;