Mastering PostCSS for Web Design
上QQ阅读APP看书,第一时间看更新

Chapter 1. Introducing PostCSS

A key part of any website is styling—it doesn't matter if this is for a simple element tag or a complex animation; a website is not a website without color and action. Building styles for any online presence takes time and effort—we can reduce development time by using a preprocessor to automate the creation of styles, automatically apply vendor prefixes and the like, but the extra dependency of a library can be like using a sledgehammer to crack a nut!

Enter PostCSS—its unique modular style allows us to create a leaner, faster CSS processor, with no external dependencies. In this chapter, we look at installing PostCSS, understanding its architecture, and learn how to use its speed and power to compile code into valid CSS. We will cover a number of topics throughout this chapter, which will include the following:

  • Considering the benefits of creating our own preprocessor
  • Introducing PostCSS and exploring its features
  • Setting up a development environment using PostCSS
  • Creating a simple example using PostCSS
  • Exploring how PostCSS works and its architecture

Let's make a start…!

Note

All of the exercises in this book are written for the Windows platform; please adjust accordingly if you use a different operating system.