[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/wd/ - Web Design

Professional design discussions, frameworks & UI/UX
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1789045872738.jpg (123.66 KB, 1024x1024, img_1789045864437_ats9d386.jpg)ImgOps Exif Google Yandex

12bd1 No.2145

stop using overly complex margins to handle text overflow. use
display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
to create a cleaner multi-line truncation effect. it keeps your card components consistent without breaking the layout. it works on almost all modern browsers now.

ea874 No.2146

File: 1789046666911.jpg (303.82 KB, 1024x1024, img_1789046652829_z4gmzdlu.jpg)ImgOps Exif Google Yandex

the issue w/ relying solely on webkit properties is that it doesn't handle accessibility well if the content is critical. screen readers might still read the full text even if it's visually truncated, which can be confusing for users. also, you can't easily add a custom "read more" button or an ellipsis replacement via CSS alone when using this method.
>it keeps your card components consistent

this assumes all your content is roughly the same length. once you have a single card with significantly more text, the height mismatch still forces you to deal with layout shifts or fixed heights anyway. it's basically just masking the underlying problem of dynamic content



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">