UnCSS your CSS! Removing Unused CSS with PostCSS & Parcel

by | Sep 17, 2020 | 0 comments

UnCSS your CSS! Removing Unused CSS with PostCSS & Parcel

by | Sep 17, 2020 | CSS Tips and Tricks | 0 comments



https://promo.linode.com/designcourse/ – Use code ‘DESIGNC19’ to get $20 credit on your new Linode account!
— Last week I released a video discussing Bootstrap. In this video, I mentioned I used PurgeCSS to remove unwanted CSS, which resulted in a drastically smaller file size. Today, we’re going to use a similar tool called UnCSS with the help of PostCSS to do just that.

PostCSS allows you to chain together a number of CSS tools.

You can use PostCSS in a number of environments, and for this one, we’re going to use Parcel (You can also use Gulp, Grunt, Webpack, etc..).

Uncss comes with a plugin that allows it to work with PostCSS, which is what we’ll use. Uncss simply compares your HTML against your CSS, and removes any unused CSS rulesets.

Project files:
https://coursetro.s3.amazonaws.com/stuff/parcelcss.zip

Let’s get started!

– – – – – – – – – – – – – – – – – – – – – –

Subscribe for NEW VIDEOS!

My site: https://coursetro.com
My personal FB account: http://fb.com/logodesigner
Coursetro FB: http://fb.com/coursetro
Coursetro’s Twitter: http://twitter.com/designcoursecom

Join my Discord! https://discord.gg/a27CKAF
^-Chat with me and others

– – – – – – – – – – – – – – – – – – – – – –

Who is Gary Simon? Well, I’m a full stack developer with 2+ decades experience and I teach people how to design and code. I’ve created around 100+ courses for big brands like LinkedIn, Lynda.com, Pluralsight and Envato Network.

Now, I focus all of my time and energy on this channel and my website Coursetro.com.

Come to my discord server or add me on social media and say Hi!

source