fix: Show max 3 lines of content on notification items

This commit is contained in:
Tom Moor
2023-07-14 21:51:15 -04:00
parent 5dcd7a74ca
commit ea07b72c7a
2 changed files with 16 additions and 1 deletions

View File

@@ -38,3 +38,16 @@ export const fadeOnDesktopBackgrounded = () => {
body.backgrounded & { opacity: 0.75; }
`;
};
/**
* Truncate multiline text.
*
* @returns string of CSS
*/
export const truncateMultiline = (lines: number) => `
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: ${lines};
overflow: hidden;
overflow-wrap: anywhere;
`;