jgthms / bulma

Modern CSS framework based on Flexbox
https://bulma.io
MIT License
49.36k stars 3.96k forks source link

After migration to v1 my CSS is 10x larger #3905

Open cooperaj opened 1 month ago

cooperaj commented 1 month ago

This is about Bulma.

Overview of the problem

This is about the Bulma CSS framework

I'm using Bulma version [1.0.2]

This is a Sass issue: latest dart-sass

Description

I have a website built with Bulma and heavily customised via SASS. I was using this setup: https://github.com/cooperaj/rmwd-hugo-theme/blob/840d879c15fabf1bd5d2994791195461616244a4/assets/sass/_bulma.scss

But after completing the migration work it now looks more like: https://github.com/cooperaj/rmwd-hugo-theme/blob/master/assets/sass/_bulma.scss (along with a whole raft of changes in the other scss files to work with SASS modules.

Other than the switch to the new version I'm made no other changes to my sites build.

My complied CSS file has gone from ~14K to ~140K though. I'm still running the whole lot through PostCSS with no change to that configuration.

You can see it all working here: https://realmenweardress.es

Steps to Reproduce

Build my Hugo site.

Expected behavior

CSS doesn't increase in size quite so much (some is ok obviously)

Actual behavior

Huge CSS size increase.

As an aside I would have gone to a forum or discord server (eww) for this kind of problem but I thought it was worth asking here without those.

cooperaj commented 1 month ago

It's worth adding that I've been able to reduce the size by about half by using a PostCSS plugin that strips unused CSS variables. My CSS is now about 70K.

jjclgi commented 1 month ago

Also see #3761 where some success has been reported using purgecss.