Enduring CSS

Ben Frain

  • 出版商: Packt Publishing
  • 出版日期: 2017-01-16
  • 售價: $1,580
  • 貴賓價: 9.5$1,501
  • 語言: 英文
  • 頁數: 134
  • 裝訂: Paperback
  • ISBN: 1787282805
  • ISBN-13: 9781787282803
  • 相關分類: CSS
  • 下單後立即進貨 (約3~4週)

商品描述

Key Features

  • Address the problems of CSS at scale, avoiding the shortfalls of scaling CSS.
  • The shortfalls of conventional approaches to scaling CSS.
  • Develop consistent and enforceable selector naming conventions with ECSS.
  • Learn how to organize project structure to more easily isolate and decouple visual components.

Book Description

Learn with me, Ben Frain, about how to really THINK about CSS and how to use CSS for any size project! I'll show you how to write CSS that endures continual iteration, multiple authors, and yet always produces predictable results. Enduring CSS, often referred to as ECSS, offers you a robust and proven approach to authoring and maintaining style sheets at scale.

Enduring CSS is not a book about writing CSS, as in the stuff inside the curly braces. This is a book showing you how to think about CSS, and be a smarter developer with that thinking! It's about the organisation and architecture of CSS—the parts outside the braces. I will help you think about the aspects of CSS development that become the most difficult part of writing CSS in larger projects.

You’ll learn about the problems of authoring CSS at scale—including specificity, the cascade and styles intrinsically tied to document structure. I'll introduce you to the ECSS methodology, and show you how to develop consistent and enforceable selector naming conventions. We'll cover how to apply ECSS to your web applications and visual model, and how you can organize your project structure wisely, and handle visual state changes with ARIA, providing greater accessibility considerations. In addition, we'll take a deep look into CSS tooling and process considerations. Finally we will address performance considerations by examining topics such as CSS selector speed with hard data and browser-representative insight.

What you will learn

  • The problems of CSS at scale—specificity, the cascade and styles intrinsically tied to element structure.
  • The shortfalls of conventional approaches to scaling CSS.
  • The ECSS methodology and the problems it solves.
  • How to develop consistent and enforceable selector naming conventions with ECSS.
  • How to organise project structure to more easily isolate and decouple visual components.
  • How to handle state changes in the DOM with ARIA or override selectors.
  • How to apply ECSS to web applications and visual modules.
  • Considerations of CSS tooling and processing: Sass/PostCSS and linting.
  • Addressing the notion of CSS selector speed with hard data and browser representative insight

About the Author

Ben Frain, Senior Front-end Developer at bet365, is a widely respected CSS developer and industry thought leader. Ben is the author of two successful and widely respected books Responsive Web Design with HTML5 and CSS3 and Sass and Compass for Designers, both published by Packt Publishing. Ben lives in Cheshire, England with his wife and two children. You can follow him on Twitter at http://twitter.com/benfrain and at his website (http://benfrain.com).

Table of Contents

  1. Writing Styles for Rapidly Changing, Long-lived Projects
  2. The Problems of CSS at Scale
  3. Implementing Received Wisdom
  4. Introducing the ECSS Methodology
  5. File Organisation and Naming Conventions
  6. Dealing with State Changes in ECSS
  7. Applying ECSS to your Website or Application
  8. The Ten Commandments of Sane Style Sheets
  9. Tooling for an ECSS Approach
  10. CSS Selector Performance
  11. Browser Representatives on CSS Performance

商品描述(中文翻譯)

主要特點



  • 解決大型CSS的問題,避免CSS在擴展時的不足之處。

  • 傳統方法在擴展CSS方面的不足之處。

  • 使用ECSS開發一致且可執行的選擇器命名慣例。

  • 學習如何組織項目結構,更容易隔離和解耦視覺組件。

書籍描述


和我一起學習,Ben Frain,如何真正思考CSS以及如何在任何規模的項目中使用CSS!我將向您展示如何編寫持續迭代、多作者且始終產生可預測結果的CSS。持久的CSS,通常稱為ECSS,為您提供了一種強大且經過驗證的方法來編寫和維護大型樣式表。


持久的CSS不是一本關於編寫CSS的書,而是一本向您展示如何思考CSS並成為更聰明的開發人員的書!它關於CSS的組織和架構——花括號外的部分。我將幫助您思考在大型項目中編寫CSS時最困難的部分。


您將了解在大型項目中編寫CSS的問題,包括特定性、層級和與文檔結構密切相關的樣式。我將介紹ECSS方法論,並向您展示如何開發一致且可執行的選擇器命名慣例。我們將介紹如何將ECSS應用於您的Web應用程序和視覺模型,以及如何明智地組織項目結構,並使用ARIA處理視覺狀態變化,提供更好的可訪問性考慮。此外,我們還將深入研究CSS工具和流程考慮。最後,我們將通過使用硬數據和瀏覽器代表性見解來解決性能考慮問題。

您將學到什麼



  • 在大型項目中編寫CSS的問題——特定性、層級和與元素結構密切相關的樣式。

  • 傳統方法在擴展CSS方面的不足之處。

  • ECSS方法論及其解決的問題。

  • 如何使用ECSS開發一致且可執行的選擇器命名慣例。

  • 如何組織項目結構,更容易隔離和解耦視覺組件。

  • 如何使用ARIA或覆蓋選擇器處理DOM中的狀態變化。

  • 如何將ECSS應用於Web應用程序和視覺模塊。

  • CSS工具和處理的考慮因素:Sass/PostCSS和linting。

  • 使用硬數據和瀏覽器代表性見解解決CSS選擇器速度的問題。

關於作者


Ben Frain,bet365的高級前端開發人員,是一位廣受尊敬的CSS開發人員和行業思想領袖。Ben是Packt Publishing出版的兩本成功且廣受尊敬的書籍《Responsive Web Design with HTML5 and CSS3》和《Sass and Compass for Designers》的作者。Ben與妻子和兩個孩子居住在英格蘭柴郡。您可以在Twitter上關注他(http://twitter.com/benfrain),並訪問他的網站(http://benfrain.com)。

目錄



  1. 為快速變化且長期存在的項目編寫樣式

  2. 大型CSS的問題

  3. 實施經驗智慧

  4. 介紹ECSS方法論

  5. 文件組織和命名慣例

  6. 處理ECSS中的狀態變化

  7. 將ECSS應用於您的網站或應用程序

  8. 理智樣式表的十條戒律

  9. ECSS方法的工具

  10. CSS選擇器性能

  11. 瀏覽器代表對CSS性能的看法