CSS too big in size

General Discussion
  • I want to develop a website and noticed that my CSS file is over 300kb minified. As I see it's kinda normal for Nodebb but I want to get it under that value without sacrificing the looks.

    Already got rid of Bootstrap glyphicons. If I put all the margin declarations inline - for example <div class="box" style="margin: 0 20px">...</div> - would it help? Is it a good ideea?

    Thank you for any help.

  • Inline styling is almost always a bad idea, because it is not a good way to organise CSS (hard to keep track of, etc.)

    When it comes to CSS payload size, the file should be cached and not re-downloaded every time the page is refreshed. For example, loading the CSS file for this page only transfers 281 bytes because the CSS file has not changed.

  • @julian Thank you. I'll keep that in mind.

  • @julian Since is still on the same problem, I guess there is no need to make another topic.
    How/from where is FontAwesome loaded? I could reduce some kb's making it lighter.


Suggested Topics