Skip to content

Build your personal knowledge base with Trilium Notes

style/media player embed: tweak

Adorian Doran8c1a03e5896a
diff --git a/apps/client/src/stylesheets/theme-next/notes/text.css b/apps/client/src/stylesheets/theme-next/notes/text.css
index bb9e76c6f9..a05b7fe1be 100644
--- a/apps/client/src/stylesheets/theme-next/notes/text.css
+++ b/apps/client/src/stylesheets/theme-next/notes/text.css
@@ -684,11 +684,18 @@ pre button.copy-button.icon-action {
padding-inline-end: calc(var(--icon-button-size) + (var(--copy-button-margin-size) * 2));
}
-html .note-detail-editable-text :not(figure, .include-note, hr):first-child {
+/* Child combinator: as a descendant one it also hit first-children nested inside a block, stacking a pixel per level. */
+html .note-detail-editable-text > :not(figure, .include-note, hr):first-child {
/* Create some space for the top-side shadow */
margin-top: 1px !important;
}
+/* Round the player, not the card: clipping the card would crop the insert-paragraph buttons. 7px = 8px radius - 1px border. */
+.include-note-content.type-video .video-preview-wrapper {
+ border-radius: 0 0 7px 7px;
+ overflow: hidden;
+}
+
.ck.ck-editor__editable pre[data-language]::after {
--ck-color-code-block-label-background: rgba(128, 128, 128, 0.5);
border-radius: 0 0 5px 5px;
diff --git a/apps/client/src/widgets/type_widgets/file/Video.css b/apps/client/src/widgets/type_widgets/file/Video.css
index 1a486fd2d7..cd3ab78a4c 100644
--- a/apps/client/src/widgets/type_widgets/file/Video.css
+++ b/apps/client/src/widgets/type_widgets/file/Video.css
@@ -7,6 +7,10 @@
background-color: black;
.video-preview {
+ /* A <video> is inline-level by default, so it sits on the text baseline and the line box reserves a
+ few pixels of descender space below it — which, at height: 100%, overflows the wrapper and puts a
+ scrollbar on the nearest scrolling ancestor (an include-note box). A block box has no baseline. */
+ display: block;
background-color: black;
width: 100%;
height: 100%;