Book Image

Professional CSS3

By : Piotr Sikora
Book Image

Professional CSS3

By: Piotr Sikora

Overview of this book

CSS is the preferred technology to design modern web pages. Although CSS is often perceived as a simple language, applying modern styles to web pages with CSS and maintaining the code for larger websites can be quite tricky. We will take you right from understanding CSS to designing high-quality web pages in CSS3. We'll quickly take you through CSS3's features, and show you how to resolve common issues so you can build your basic framework. Finally, you will learn about code architecture and CSS methodologies used in scalable apps and you'll explore the various new features of CSS3, such as FlexBox, to help you create the most modern layout methodologies. By the end of the book, you will be a master at creating pure CSS web pages and will know sophisticated web design techniques, giving you an edge over other web designers.
Table of Contents (16 chapters)
15
Index

UnCSS

How many times have you faced a situation where some classes/selectors are not used in HTML but are described in CSS code? This happens every time your project is changed or redesigned. For example, your task is to remove some section and add a few more lines in the HTML code. So you will add some CSS code and then remove some of it. But are you sure that the CSS code doesn't contain unused CSS portions of code? UnCSS will help you to finish this task. To install it, you need to execute this command:

npm install -g uncss

Let's take a look at the flags used in the npm command:

Flag

Description

-g

Global installation

--save

Local installation

These packages will appear in package.json in the section dependencies.

These packages are needed to run your app in production.

--save-dev

Local installation

These packages will appear in package.json in the section devDependencies.

These packages are needed for development and testing processes.

Integrating UnCSS in Gulp

First,...