Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一图读懂《Introduction to Defensive CSS》 #8

Open
OSInsight opened this issue Feb 23, 2023 · 0 comments
Open

一图读懂《Introduction to Defensive CSS》 #8

OSInsight opened this issue Feb 23, 2023 · 0 comments

Comments

@OSInsight
Copy link
Owner

原文地址:https://defensivecss.dev/articles/intro-defensive-css/

一句话总结

本文作者是前端兼设计师 Ahmad(之前有解读过他的《The Guide To Responsive Design In 2023 and Beyond》),主要介绍 CSS 防御性编程(Defensive Programming)—— 防御性设计 Defensive design 在 CSS 上的体现。文章内容不多,通过几个示例,让前端以及设计师了解看似完美设计和实现,可能会在边界情况下出现各种问题,从而引起重视。

原文划重点

Back in December 2021, I wrote an article titled Defensive CSS. I used that term because that's really what is it about. I wanted a term that communicates the concept of writing CSS that prevents unexpected layout behaviors, or at least, reduces them.

作者在 2021 年底的时候已经写过一篇介绍防御性 CSS 编程的文章,提出了 “防御性 CSS” 这一概念。

It turned out that defensive CSS doesn't only apply to CSS, but UI design as well. As a designer, you need to either work on visual variations of a component with all the possible use-cases or at least communicate them clearly with the development team.

防御性设计的实现不仅需要 CSS,还需要设计师。设计师需要将组件各种情况下的视觉都设计好,最起码让开发者了解。

In this introduction article, I will shed the light on why it's important to design and write CSS defensively, and how we can take it from there.

在这篇文章中,主要介绍防御性设计、防御性 CSS 编程以及开发者应该从何开始。

一图读懂

一图读懂《Introduction to Defensive CSS》

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant