Clean and Scalable CSS Architecture (2023)

所在平台: Udemy

课程主页: https://www.udemy.com/course/clean-and-scalable-css-architecture/

课程评论:没有评论

第一个写评论        关注课程

课程简介

课程名称:清晰与可扩展的 CSS 架构(2023) 概述:CSS 是一门容易学习和书写的语言,但在大型项目中编写可扩展和可维护的代码却非常具有挑战性。原因主要有以下几点:首先,CSS 的全局作用域意味着一个文件的修改可能会对其他元素或页面产生意想不到的影响;其次,CSS 是一种高度可变的语言,级联特性会导致混淆与意外的结果。此外,CSS 还高度依赖于源代码的顺序,而特异性问题往往会破坏我们对代码结构的预期。随着代码量的增加,我们往往不得不写更多的 CSS 来修复旧的 CSS,最终使整个 CSS 代码变得混乱和庞大。因此,我们需要一种更好的方法,即模块化和可预测的 CSS。自1998年以来,CSS 语言并未显著进化,尽管有预处理器但并未解决根本问题。 本课程将探讨 CSS 架构以及如何编写清晰和可维护的代码。我们的目标是让 CSS 具备以下特性:可预测性、可重用性和可维护性。学习者将了解到如何将面向对象的编程(OOP)理念应用于 CSS,利用诸如 DRY 原则、SOLID 原则和不可变性等概念来提升 CSS 的质量与可读性。尽管有很多关于 CSS 进阶技巧的课程(如 flexbox、CSS 动画等),本课程将专注于 CSS 的架构。 如果你对学习如何编写清晰且可扩展的 CSS 代码感兴趣,这门课程将是你理想的选择!这是我在开始处理更复杂项目时所希望能接触到的课程。

课程评论(0条)

课程详情

CSS is easy, it's easy to learn, it's easy to write.But actually, it's hard to write scalable and maintainable code especially with large projects that require constant scaling…There are many reasons why this is the case:- In CSS everything is in a global scope. Any change in one file can cause an (un)expected result in another element, or page.- CSS is a highly mutable language, because of it's cascade nature. Each mutation leads to confusion and unexpected results.- CSS highly depends on the source order.- On the other hand, specificity can undo everything. It doesn't matter how you structure your code, specificity can break everything. Specificity is one of the biggest problems of CSS.- CSS is not (easily) scalableWe end up in a cycle of writing more CSS just to fix the old CSS! At some point our whole CSS code becomes too messy and too large. We need a better approach, we need a modular and predictable CSS. CSS language has not evolved since 1998. There are preprocessors, but they are not solving the main CSS issues. After all, SASS and Less are compiling to CSS.In this course, we will talk about the CSS architecture, and how to write clean and maintainable code. Our goal is to write CSS that should be:- Predictable: CSS rules behave as we expect them to.- Reusable: When adding new components, we shouldn't need to recode patterns or problems we've already solved.- Maintainable: New features, components, or updates shouldn't require refactoring our CSS and should NOT break existing components.The idea is taking the OO philosophy you already learned in Java, PHP, C# and finding a way to translate that into CSS as well. All that you learned in OOP languages, all the DRY principles, SOLID, SRP, immutability we can apply to CSS in some way. Simple is the best.There are many advanced courses about CSS, about flexbox, CSS animations, CSS grid… However, in this course, we will be focusing on the architecture of CSS. If you are interested in learning how to write clean and scalable CSS code, this course is the right thing for you!This is a course I wish I had when I started working on more complex projects.

课程标签

0人关注该课程

主题相关的课程