From eaca8f32e41e5bfd43919ed23c8403ce2a810eda Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Mon, 22 Jan 2024 11:59:04 +0100 Subject: [PATCH] Experiment with overflowing text and ellipses --- .../highlights/HighlightSidebar.vue | 61 +++++++++++++++---- 1 file changed, 49 insertions(+), 12 deletions(-) diff --git a/client/src/components/highlights/HighlightSidebar.vue b/client/src/components/highlights/HighlightSidebar.vue index acf95d3f..d69036e5 100644 --- a/client/src/components/highlights/HighlightSidebar.vue +++ b/client/src/components/highlights/HighlightSidebar.vue @@ -4,19 +4,47 @@
-

Meine Markierung

- - Haben Sie sich beim Shoppen schon mal überlegt, aus welchem Beweggrund Sie ein b... +

Meine Markierung

+ + hier ist ein bischen mehr text blabla blabla bla blabla blabla bla bla blabla blabla bla blabla blabla bla bla + noch mehr text noch mehr text +
{{ overflowing }}
+
{{ highlightMark?.scrollHeight }}
+
{{ highlightMark?.clientHeight }}
-

Meine Notiz

+

Meine Notiz

+
+ +
@@ -61,15 +89,24 @@ const Cross = defineAsyncComponent(() => import('@/components/icons/CrossIcon.vu padding: var(--large-spacing) 0; } - &__section-title { - font-family: var(--sans-serif-font-family); - font-weight: 600; - font-size: var(--regular-font-size); + &__highlighted-text { + display: inline-block; + --num-lines: 3; + max-height: calc(var(--regular-font-size) * var(--paragraph-line-height) * var(--num-lines)); + overflow: hidden; + text-overflow: ellipsis; + position: relative; + /* white-space: nowrap; */ + &::after { + content: '...'; + position: absolute; + right: 5px; + bottom: 0; + } } - &__highlighted-text { - font-family: var(--serif-font-family); - line-height: 1.5rem; + &__note-form { + min-height: 100px; } }