惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cloudbric
Cloudbric
T
Threat Research - Cisco Blogs
Simon Willison's Weblog
Simon Willison's Weblog
AWS News Blog
AWS News Blog
P
Privacy & Cybersecurity Law Blog
H
Help Net Security
云风的 BLOG
云风的 BLOG
G
GRAHAM CLULEY
Spread Privacy
Spread Privacy
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
Arctic Wolf
Project Zero
Project Zero
Engineering at Meta
Engineering at Meta
P
Privacy International News Feed
Blog — PlanetScale
Blog — PlanetScale
Stack Overflow Blog
Stack Overflow Blog
M
MIT News - Artificial intelligence
The Register - Security
The Register - Security
Recorded Future
Recorded Future
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
Cisco Blogs
PCI Perspectives
PCI Perspectives
Recent Announcements
Recent Announcements
Martin Fowler
Martin Fowler
A
About on SuperTechFans
W
WeLiveSecurity
GbyAI
GbyAI
V
Vulnerabilities – Threatpost
The GitHub Blog
The GitHub Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Check Point Blog
Y
Y Combinator Blog
月光博客
月光博客
Scott Helme
Scott Helme
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
U
Unit 42
G
Google Developers Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Threatpost
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google Online Security Blog
Google Online Security Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Cisco Talos Blog
Cisco Talos Blog
博客园 - 三生石上(FineUI控件)
Hugging Face - Blog
Hugging Face - Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 司徒正美

Defensive CSS

Defensive CSS - Button minimum width Defensive CSS - Input zoom on iOS Safari Defensive CSS - Default flexbox stretching Defensive CSS - Image inner border Defensive CSS - Accidental hover on mobile Defensive CSS - Vertical media queries Defensive CSS - Text over image Defensive CSS - Using space-between Defensive CSS - Scrollbars on demand Defensive CSS - Scrollbar gutter Defensive CSS - Scroll chaining Defensive CSS - Position sticky with CSS Grid Defensive CSS - Image maximum width Defensive CSS - Grouping vendor selectors Defensive CSS - Minimum Content Size In CSS grid Defensive CSS - Minimum Content Size In CSS Flexbox Defensive CSS - Fixed sizes Defensive CSS - CSS Variable Fallback Defensive CSS - CSS grid fixed values Defensive CSS - Background repeat Defensive CSS - Auto-fit Vs Auto-fill Defensive CSS - Component Spacing Defensive CSS - Image Distortion Defensive CSS - Flexbox Wrapping
Defensive CSS - Long Content
2022-04-19 · via Defensive CSS

Here is a list of people’s names and it looks perfect for now.

However, since this is user-generated content, we need to be careful about how to defense the layout in case of something too long.

In such layouts, consistency is important. To achieve that, we can simply truncate the name by using text-overflow and its friends.

In some scenarios, we might need to truncate a text that isn't important for the user, or doesn't affect the user experience. In such a case, truncating the text is a good idea.

Defensive CSS is a good way to write bullet-proof CSS!

Toggle Defensive

If you’re interested to sharpen your skills in handling long content in CSS, I wrote a detailed article on that topic.