Generate "main.css" only with tachyons.css calls really used on the website

Dear,

I used Tachyons to have pre-views of my website. But to implement my corporate identity and have harmonious styles on all pages, I created my own CSS.

To optimise performances of a website, one of the way (among many others) is to reduce the size of the CSS file. When I generated the “main.css”, the file size was 85ko. But when I delete the tachyons.css file, I reach 13Ko !

As there are some remains of tachyons calls in some pages from the initial template I used (ANANKE), I wonder if there any way, when generating the “main.css”, to extract from tachyons.css only the ones which are really used in the website ?

Thanks !

https://gohugo.io/hugo-pipes/postprocess/#css-purging-with-postcss

1 Like

Thanks a lot @jmooring and sorry for the late reply. I will implement it soon.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.