From: Ardis Lu Date: Thu, 13 Apr 2023 05:00:28 +0000 (-0700) Subject: Repeat the CSS in the final section X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=1f264870c98510697a32e52ac2b8a81a24d6c1ff;p=css-for-line-clamp-ellipsis Repeat the CSS in the final section --- diff --git a/index.html b/index.html index 20abe68..63395c7 100644 --- a/index.html +++ b/index.html @@ -269,6 +269,14 @@ new ResizeObserver(debounce(() => {

Full example

+

Here's the final CSS:

+
+.dynamic-line-clamp {
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: var(--lines);
+  overflow: hidden;
+}

And the final combined JavaScript with all the bells and whistles:

 function debounce(fn, wait) {