- Mastering PostCSS for Web Design
- Alex Libby
- 319字
- 2021-07-14 11:12:25
Summary
Anyone who has spent time using pre-processors such as SASS will no doubt be familiar with variables and mixins; these make up an integral part of using PostCSS. We've covered a lot of material relating to their use throughout this chapter, so let's take a breather and review what we have learned.
We kicked off with a brief introduction to variables and mixins in SASS, before setting up an example demo in SASS (and Less CSS) as a basis for conversion to PostCSS.
Next up came the start of the transition process to PostCSS. We first looked at adding variable support in, before updating our hover demo to use the new plugin and remove a dependency on using SASS. We then covered some benefits and considerations of using PostCSS, before discovering how a simple tweak in the order of plugins can have a big impact on the end result.
We moved swiftly on with a look at mixins. We covered the install of the postcss-mixins plugin, before using it to update our demo. At this point, we paused for a moment to consider some of the differences between standard processors and PostCSS, and covered how one of the key points to bear in mind is PostCSS's flexibility and power.
We then rounded out the chapter with a look at looping content. We first explored the use of the for statement, before moving on and taking a look at how we can easily style content using the @each
function. We then covered its use in a simple demo for styling social media icons. This started in SASS, but finished with the converted results using PostCSS.
Phew, let's move on! Our next stop on this whistlestop tour of mastering PostCSS is a look at nesting, and no, not for our feathered friends, but how we can (dramatically) reduce the content we write, or at least make it easier to read!
- Learning LibGDX Game Development(Second Edition)
- Learning Single:page Web Application Development
- vSphere High Performance Cookbook
- PHP 7底層設計與源碼實現
- JavaScript+jQuery網頁特效設計任務驅動教程(第2版)
- 編寫整潔的Python代碼(第2版)
- Windows Forensics Cookbook
- 劍指Java:核心原理與應用實踐
- Python極簡講義:一本書入門數據分析與機器學習
- Python自然語言理解:自然語言理解系統開發與應用實戰
- Sails.js Essentials
- Go語言從入門到精通
- Python Programming for Arduino
- 深入理解Kafka:核心設計與實踐原理
- Keil Cx51 V7.0單片機高級語言編程與μVision2應用實踐