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

Creating plugins to provide extra CSS4 support


Throughout the course of this chapter, we've covered a number of plugins that handle support for the upcoming CSS4 standards, and explored how we can use the cssnext plugin pack to manage the transition to using these new styles.

There is more out there that we can do—the great thing about PostCSS is that we can absolutely write our own plugins to help bolster support for CSS4 attributes. To help prove this, over the next few pages we'll work our way through fixing some issues in CSS, and altering an existing CSS4 color plugin to add support for a different color; we'll start with adding a little color to our next demo, if you pardon the pun!

Adding future color support to CSS

"She made it to six. For almost twelve hours, she was six…"

There is something of a poignant twist to this next demo—the color rebeccapurple, which forms the basis for this next exercise, came about as a tribute to Eric Meyer's daughter, Rebecca, who passed away on her sixth...