From a1a78f5f8335c8c22a305a0d9cbb5c76a8a44cf3 Mon Sep 17 00:00:00 2001 From: khushi santosh patil <143253539+khushipatil1523@users.noreply.github.com> Date: Fri, 24 Jan 2025 16:54:22 +0530 Subject: [PATCH] Update app.module.css --- src/style/app.module.css | 63 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/src/style/app.module.css b/src/style/app.module.css index b7a743549d..5f30da4898 100644 --- a/src/style/app.module.css +++ b/src/style/app.module.css @@ -6651,25 +6651,80 @@ button[data-testid='createPostBtn'] { justify-content: space-around; width: 8rem; } - +🛠️ Refactor suggestion + +Improve text truncation accessibility. + +The text truncation should maintain accessibility while preventing layout shifts. + + .orgName { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + font-size: 1rem; ++ max-width: 100%; ++ display: block; + } + + .orgdesc { + font-size: 0.9rem; + color: var(--bs-gray-600); + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 1; + line-clamp: 1; + -webkit-box-orient: vertical; + max-width: 20rem; ++ /* Fallback for browsers that don't support line-clamp */ ++ @supports not (-webkit-line-clamp: 1) { ++ white-space: nowrap; ++ text-overflow: ellipsis; ++ } + } +📝 Committable suggestion +‼️ IMPORTANT +Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. + +Suggested change .orgName { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; font-size: 1rem; } - .orgdesc { font-size: 0.9rem; + color: var(--bs-gray-600); + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 1; + line-clamp: 1; + -webkit-box-orient: vertical; + max-width: 20rem; +} +.orgName { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + font-size: 1rem; + max-width: 100%; + display: block; +} - color: var(--org-desc-color); - +.orgdesc { + font-size: 0.9rem; + color: var(--bs-gray-600); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; max-width: 20rem; + /* Fallback for browsers that don't support line-clamp */ + @supports not (-webkit-line-clamp: 1) { + white-space: nowrap; + text-overflow: ellipsis; + } } .orgadmin {