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

Providing fallback support


A key concern when designing web content is browser support—which browsers do we support? If the only browsers we had to support were the likes of Firefox or Chrome, then our job would be easy. Trouble is, we also have IE, Safari, Edge…not to mention mobile devices! Life would be boring otherwise…

But I digress, back to reality: for those legacy browsers that refuse to conform (yes, I'm looking at you in particular, IE), we have to consider providing some form of support or graceful degradation. Thankfully, there are a number of plugins we can use within the PostCSS ecosystem—we've already used one in the form of Autoprefixer; there are others available, so let's dive in and take a look at a selection of these plugins in more detail. Before we do so, though, there is a useful tip that I want to explore, which can help with checking for, and providing, legacy support in our browsers.

Detecting support for features

A key part of the development process is to ensure...