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

Highlighting our syntax code


Throughout many of our demos, we've concentrated on using plugins, with minimal changes required to configure the code for use. There is nothing wrong with this, but as always, we can do better. How about installing support for highlighting?

This is an easy way to make it easier to read our code, indeed, we should have installed something like this a long time ago! That aside, it's easy enough to fix; support is available for a wide variety of editors. For the purposes of this chapter, I will assume you are using Sublime Text; this is an example of how it might look (the screenshot shows the Twilight Light theme in use):

Let's dive in and take a look at how to get this set up, using Sublime Text's package manager.

Installing themes

Adding theme support is a cinch when using an editor such as Sublime Text. Let's work through the steps:

  1. We'll start by opening a command prompt session. Go ahead and add this command, then press Enter:

    cd %APPDATA%\Sublime Text 3\Packages...