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 an example with Bourbon Neat


Constructing a site using Bourbon Neat is a simple process, it does not require any special markup on our web page; the effort is all within the compiled style sheet.

To prove this, we'll construct a simple web page that could easily be part of any website—I've used a Japanese theme as the basis for my page, but the principles we will use can apply to any site. You'll see that (with the exception of the standard SASS style of code used) there are only three instances where we have used Bourbon Neat-specific code.

Let's make a start:

  1. From the code download that accompanies this book, go ahead and extract a copy of Tutorial30, and save it to the root of our project area.

  2. Copy the contents of the sample site – pre-compile from within the Tutorial30 folder to the src folder within our project area. Go ahead and rename it as sample.scss.

  3. Next, fire up a Node.js command prompt, then change the working folder to our project area.

  4. At the prompt, enter gulp, then press...