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

Dissecting issues with our processor


With a Gulp task file and associated package.json file in place, we should be good to go, right? Well, not quite—yes, our processor has been used on demos throughout the book to great effect. But there is more that we can do: our Gulp file should never be static; we should always look to review it periodically, to ensure it is working at optimal efficiency.

Note

To see an updated version of our Gulp file, take a look in the T49 – fixing issues in Gulpfile folder within the code download that accompanies this book.

Our Gulp file does have a few issues we need to address, so let's look at these now:

  • Some of our tasks are not correctly named—for example, the styles task could be renamed to better reflect that we're using Rucksack in this task.

  • There is a question about the use of source maps; so far we've used a dedicated source map plugin to create them. An upcoming change in Gulp 4 will reduce the need for a plugin—support for creating them is being added to...