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

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...