Log in

styles.all.min.css is all jumbled...?

  • 28 Jan '16

Playing around with using spirit and I notices that the styles.all.min.css file looks like this...

Untitled.png

What's with that?

nitelyEsteban Castro Borsani
  • 1
  • 28 Jan '16

It's called minification. The source (for devs) can be found here

  • 28 Jan '16

I see, if I wanted to edit this, how should I go about doing it? Should I edit the normal files or just ctrl-f and edit the minified file? Are they compiled at some point from the normalized files?

  • 29 Jan '16

Also, I just realized, these files are......MASSIVE. Is there anything that can be done to cut down their size?

Did you write all of these by hand?

nitelyEsteban Castro Borsani
  • 2
  • 29 Jan '16

I see, if I wanted to edit this, how should I go about doing it? Should I edit the normal files or just ctrl-f and edit the minified file? Are they compiled at some point from the normalized files?

It depends, you should add your own CSS file and override whatever rules you want. If you really want to edit the core files, then there is a readme explaining how to compile the Sass + CSS files.

Also, I just realized, these files are......MASSIVE. Is there anything that can be done to cut down their size?

The CSS is 25KB gzipped and the JS is 67KB, I'd not call them massively huge for today's standards... There is no way to cut down any of them, except if you rewrite the whole UI, which I plan to do some day. The css file will keep being big coz of fontawesome and the emojis (there are like +800) which are half the final CSS size.

Did you write all of these by hand?

Nop, maybe 1/10, probably much less.

  • 29 Jan '16

@nitely said:
The CSS is 25KB gzipped and the JS is 67KB, I'd not call them massively huge for today's standards... There is no way to cut down any of them, except if you rewrite the whole UI, which I plan to do some day. The css file will keep being big coz of fontawesome and the emojis (there are like +800) which are half the final CSS size.

But aren't they transferring across my server uncompressed? Wouldn't a new user of mine be downloading a 215kb min.js file every time the forum page loads?

nitelyEsteban Castro Borsani
  • 3
  • 29 Jan '16

But aren't they transferring across my server uncompressed?

No. There is 25kb transferred, then it's uncompressed by your browser. You can check that out with your browser dev tools.

Wouldn't a new user of mine be downloading a 215kb min.js file every time the forum page loads?

25KB and 67KB, only in the first visit. Files are cached for following visits/page views.

This is assuming your server is properly configured (to compress and send the cache meta data, although the meta data is to avoid a round trip and check if the file is up to date or needs to be re-downloaded).

This comment was deleted.
This comment was deleted.
  • 30 Apr '16

@deltaskelta said:
But aren't they transferring across my server uncompressed? Wouldn't a new user of mine be downloading a 215kb min.js file every time the forum page loads?

200kb per page is not much for todays websites. The frontpage of google alone transfers 400kb.

Reply