Book Image

Mastering PostCSS for Web Design

By : Alex Libby
Book Image

Mastering PostCSS for Web Design

By: Alex Libby

Overview of this book

PostCSS is a tool that has quickly emerged as the future of existing preprocessors such as SASS and Less, mainly because of its power, speed, and ease of use. This comprehensive guide offers in-depth guidance on incorporating cutting-edge styles into your web page and at the same time maintaining the performance and maintainability of your code. The book will show how you can take advantage of PostCSS to simplify the entire process of stylesheet authoring. It covers various techniques to add dynamic and modern styling features to your web pages. As the book progresses, you will learn how to make CSS code more maintainable by taking advantage of the modular architecture of PostCSS. By the end of this book, you would have mastered the art of adding modern CSS effects to web pages by authoring high performing, maintainable stylesheets.
Table of Contents (21 chapters)
Mastering PostCSS for Web Design
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Preparing our environment


Throughout the course of this chapter, we will be working directly with the PostCSS API (or a plugin's individual API, if it has one). As we are working directly on CSS (and not simply through a plugin's configuration object), it makes sense to install a syntax highlighter that works with PostCSS.

Not every text editor has one, but if you happen to use Sublime Text, with the Package Control facility installed (and I am assuming this is the case for the demos in this book), then it has a highlighter available for PostCSS that we can install. The plugin is available at https://github.com/hudochenkov/Syntax-highlighting-for-PostCSS. Let's get it installed using the following steps:

  1. Open up Sublime Text, then press Cmd + Shift + P (OS X) or Ctrl + Shift + P (Linux/Windows) to open the command palette.

  2. From the list that appears, click on Package Control: Install Package.

  3. After a few moments, it will show a new list; start typing Syntax Highlighting for PostCSS:

  4. When it appears...