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

Making use of pre-built libraries


Up to this point, all of our animations have had one thing in common—they are individually created, and stored within the same stylesheet as other styles for each project.

This will work perfectly well, but we can do better—after all, it's possible that we may well create animations that others have already built! Over time, we may also build up a series of animations that can form the basis of a library that can be reused for future projects.

A number of developers have already done this. One example of note is the Animate.css library, created by Dan Eden. It's worth getting to know this library, as we will use it later in this book in the guise of the postcss-animation plugin for PostCSS. In the meantime, let's run through a quick demo of how it works, as a precursor to working with it in PostCSS.

Note

The images used in this demo are referenced directly from the LoremPixem site, as placeholder images.

Let's make a start:

  1. We'll start by extracting a copy of...