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

Converting CSS4 styles for use


The idea behind basing CSS4 around a series of modules was aimed at making it easier (and ultimately quicker) to update each standard; it does mean that modules will be in a state of flux, at least for the time being!

This said, there are some clear styles we can recreate using current CSS3 styles—one such example is CSS4 Selectors. Even though it is still in draft at the time of writing, a PostCSS plugin is available in the form of postcss-selector-not (from https://github.com/postcss/postcss-selector-not). A sister style that is also available as a PostCSS plugin is postcss-selector-matches (available from https://github.com/postcss/postcss-selector-matches)—these two are intended to replicate the :not negation and :matches pseudo-selectors that are coming as part of the new CSS4 standard.

Note

For more information on individual CSS4 selectors, take a look at the full list available at http://css4-selectors.com/selectors/. This will also give you an indication...