code4romania / taskforce-fe-components

reusable frontend components for taskforce projects
https://taskforce-fe-components.now.sh
Mozilla Public License 2.0
11 stars 34 forks source link

Unused CSS #184

Closed Utwo closed 3 years ago

Utwo commented 4 years ago

After #180 is done, the next big concern is high CSS bundle size with a lot of unused code.

Now, we import bulma in fe-components but we only use a very small subset of bulma features. For decreasing the size of the bundle we can remove bulma altogether and write our own CSS. In order for us not to end up in the same situation after a couple of month with a lot of unused CSS, I will propose to use a CSS-in-JS solution.

Note that because we remove bulma, this will be a breaking change. Consumer app should import Bulma with whatever features it needs.

surdu commented 3 years ago

Personally, I hate CSS-in-JS ...

How about importing only what we need form Bulma

surdu commented 3 years ago

Scratch that... We already do this: https://github.com/code4romania/taskforce-fe-components/blob/master/src/styles.scss

We seem to import only what we need. There might be one - two modules that might not be needed anymore, but we don't import the whole Bulma library.

Utwo commented 3 years ago

Yes, it's fine, we can close this :+1: