Defensive CSS

Ahmad Shadeed nails it again with “Defensive CSS.” The idea is that you should write CSS to be ready for issues caused by dynamic content.

More items than you thought would be there? No problem, the area can expand or …


Defensive CSS originally published on CSS-Tricks


This content originally appeared on CSS-Tricks and was authored by Chris Coyier


Ahmad Shadeed nails it again with “Defensive CSS.” The idea is that you should write CSS to be ready for issues caused by dynamic content.

More items than you thought would be there? No problem, the area can expand or scroll. Title too long? No problem, it either wraps or truncates, and won’t bump into anything weird because margins or gaps are set up. Image come over in an unexpected size? No worries, the layout is designed to make sure the dedicated area is filled with image and will handle the sizing/cropping accordingly.

There is no such thing as being a good CSS developer and not coding defensively. This is what being a CSS developer is, especially when you factor in progressive enhancement concepts and cross-browser/device unknowns.

To Shared LinkPermalink on CSS-Tricks


Defensive CSS originally published on CSS-Tricks


This content originally appeared on CSS-Tricks and was authored by Chris Coyier


Print Share Comment Cite Upload Translate Updates
APA

Chris Coyier | Sciencx (2021-12-31T18:41:47+00:00) Defensive CSS. Retrieved from https://www.scien.cx/2021/12/31/defensive-css-3/

MLA
" » Defensive CSS." Chris Coyier | Sciencx - Friday December 31, 2021, https://www.scien.cx/2021/12/31/defensive-css-3/
HARVARD
Chris Coyier | Sciencx Friday December 31, 2021 » Defensive CSS., viewed ,<https://www.scien.cx/2021/12/31/defensive-css-3/>
VANCOUVER
Chris Coyier | Sciencx - » Defensive CSS. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/12/31/defensive-css-3/
CHICAGO
" » Defensive CSS." Chris Coyier | Sciencx - Accessed . https://www.scien.cx/2021/12/31/defensive-css-3/
IEEE
" » Defensive CSS." Chris Coyier | Sciencx [Online]. Available: https://www.scien.cx/2021/12/31/defensive-css-3/. [Accessed: ]
rf:citation
» Defensive CSS | Chris Coyier | Sciencx | https://www.scien.cx/2021/12/31/defensive-css-3/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.