From b1e0ffc35b3066571117aa0472f16d2d6c424c91 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Fri, 7 Apr 2023 20:08:52 -0700 Subject: [PATCH] Remove trailing newline in
 tags

---
 index.html | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/index.html b/index.html
index 968d023..ef497c8 100644
--- a/index.html
+++ b/index.html
@@ -59,8 +59,7 @@
   -webkit-box-orient: vertical;
   -webkit-line-clamp: 5;
   overflow: hidden;
-}
-    
+}

Here is the above CSS in action. Try adjusting the paragraph's width:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore @@ -85,8 +84,7 @@ -webkit-box-orient: vertical; -webkit-line-clamp: var(--lines); overflow: hidden; -} - +}

And this JavaScript:

 function getLineHeightInPx(elem) {
@@ -99,8 +97,7 @@ function getLineHeightInPx(elem) {
 }
 
 const elem = document.querySelector('.dynamic-line-clamp');
-new ResizeObserver(_ => elem.style.setProperty('--lines', Math.floor(elem.clientHeight / getLineHeightInPx(elem)))).observe(elem);
-    
+new ResizeObserver(_ => elem.style.setProperty('--lines', Math.floor(elem.clientHeight / getLineHeightInPx(elem)))).observe(elem);

Try adjusting the height:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore -- 2.47.3