Minified CSS

The less unecessary CSS that your page has, the faster your page will load (all else being equal). If you can identify areas where you CSS can be minified (or minimized) without changing your page's experience, then you've found an opportunity to make your page faster. How do you remove unecessary CSS?

What is minified CSS?

A minified CSS file means that the code is free from whitespace, comments, and semicolons, along with shorter variable names and functions. This leads to having a more compact file size, reducing the payload sizes and script parse time.

How to test minified CSS?

You can find all of your unminified CSS files by using the Google Chrome web dev tool. It'll show you which files should be minified and the potential savings in kibibytes (KiB) that comes from minifying those files. Doing so can improve your page load performance.

Run a Website Test

How to fix the minified CSS error?

It's common for developers to minify the CSS files on their own by removing extra spaces, comments, and code. For example, #000000 can be shortened to #000. However, for sites that don't update too often, you can use an online service that minifies CSS files. You can paste your CSS into the tool, and it will give you a minified version of the CSS. For more advanced use cases, you'll want to set up a workflow that minizies CSS when you deploy code. Some common tools are Gulp or Webpack.

Website performance test results with minified CSS Error

Source: TemplateToaster Blog

Learn how to address minify CSS issues on academy.hubspot.com