Skip to content

Commit f6afc0b

Browse files
committed
style/scrolling container widget: improve full-height widget handling
1 parent ecfa333 commit f6afc0b

File tree

6 files changed

+21
-8
lines changed

6 files changed

+21
-8
lines changed

apps/client/src/stylesheets/relation_map.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
.note-detail-relation-map {
66
height: 100%;
77
overflow: hidden !important;
8-
padding: 10px;
98
position: relative;
109
}
1110

apps/client/src/stylesheets/style.css

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2516,7 +2516,7 @@ footer.webview-footer button {
25162516
transform: rotate(180deg);
25172517
}
25182518

2519-
/* CK Edito */
2519+
/* CK Editor */
25202520

25212521
/* Insert text snippet: limit the width of the listed items to avoid overly long names */
25222522
:root body.desktop div.ck-template-form li.ck-list__item .ck-template-form__text-part > span {
@@ -2546,4 +2546,18 @@ iframe.print-iframe {
25462546

25472547
.excalidraw.theme--dark canvas {
25482548
--theme-filter: invert(100%) hue-rotate(180deg);
2549+
}
2550+
2551+
/* Scrolling container */
2552+
2553+
.scrolling-container:has(> :is(.note-detail.full-height, .note-list-widget.full-height)) {
2554+
display: flex;
2555+
flex-direction: column;
2556+
}
2557+
2558+
.scrolling-container > .note-detail.full-height {
2559+
position: relative;
2560+
flex-grow: 1;
2561+
width: 100%;
2562+
height: 100%;
25492563
}

apps/client/src/widgets/collections/NoteList.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
contain: none !important;
77
}
88

9-
body.prefers-centered-content .note-list-widget {
9+
body.prefers-centered-content .note-list-widget:not(.full-height) {
1010
/* Horizontally center the widget in its parent when the "Keep content centered" option is on */
1111
margin-inline: auto;
1212
}

apps/client/src/widgets/note_detail.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ const TPL = /*html*/`
4848
/* Horizontally center the widget in its parent when the "Keep content centered" option is on */
4949
margin-inline: auto;
5050
}
51-
52-
.note-detail.full-height {
53-
height: 100%;
54-
}
5551
</style>
5652
</div>
5753
`;

apps/client/src/widgets/type_widgets/canvas.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ import protected_session_holder from "../../services/protected_session_holder.js
1313
const TPL = /*html*/`
1414
<div class="canvas-widget note-detail-canvas note-detail-printable note-detail">
1515
<style>
16+
.canvas-widget {
17+
height: 100%;
18+
}
19+
1620
.excalidraw .App-menu_top .buttonList {
1721
display: flex;
1822
}

apps/client/src/widgets/type_widgets/relation_map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const linkOverlays = [
103103
];
104104

105105
const TPL = /*html*/`
106-
<div class="note-detail-relation-map note-detail-printable">
106+
<div class="note-detail-relation-map full-height note-detail-printable">
107107
<div class="relation-map-wrapper">
108108
<div class="relation-map-container"></div>
109109
</div>

0 commit comments

Comments
 (0)