Skip to content

Commit

Permalink
clamp next actionable item text when verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
avidrucker committed Nov 21, 2023
1 parent 861b1ee commit 4d21e1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,10 @@
display: inline-block;
}
}

/* courtesy of css-tricks */
.line-clamp-3 {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,12 +446,12 @@ function App() {

{tasks.length > 0 && renderList(tasks, activeListOffset, true)}

<div className="ph3 pb3">
<div className="ph3 pb3 o-50">
<p className="ma0 measure-narrow ml-auto mr-auto lh-copy balance">
{`You have ${tasks.length} item${tasks.length !== 1 ? 's' : ''} in your list.`}
</p>

<p className="ma0 measure-narrow ml-auto mr-auto lh-copy balance">
<p className="ma0 measure-narrow ml-auto mr-auto lh-copy balance line-clamp-3 overflow-hidden">
{(benchmarkItem(tasks) !== null) && `The next actionable item is '${benchmarkItem(tasks).text}'.`}
</p>
</div>
Expand Down

0 comments on commit 4d21e1c

Please sign in to comment.