Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim semantic.min.css to only what is actually used #3

Open
mspanish opened this issue Feb 17, 2015 · 1 comment
Open

Trim semantic.min.css to only what is actually used #3

mspanish opened this issue Feb 17, 2015 · 1 comment

Comments

@mspanish
Copy link

I know right now you are using the kitchen sink which requires all of semantic.min.css - but that is a 400KB file, minified! Yikes!!

I suggest for your theme itself, you get rid of this bloated file - run the CSS through Addy Asmoni's UnCSS https://github.com/addyosmani/grunt-uncss - and use the trimmed version as your main CSS file. Then link to the bloated version on the kitchen sink only - making a note to users that they will need to add this file if they want the full tamale.

400KB is worse than Bootstrap, agghh! :)

I'll probably do this myself (the grunt uncss) - and can upload my file after I do that.

@manavsehgal
Copy link
Owner

This is a good spot. I have been thinking about this as well... what is the best way to address this:

  1. Use CDN semantic-ui and live with 400K. Benefit - semantic-ui popularity is increasing and chances of users finding the same css in browser cache has benefits of zero payload. Easiest to implement, as one call for all website pages.
  2. Use a lighter version of CDN semantic-ui based on features. Requires work in figuring out and tracking what features are used on what pages/posts. Cannot be one solution for all pages.
  3. Use grunt-uncss or custom grunt build process. Requires most work as it needs to test for (2) and maintain the grunt build workflow.
  4. Wait for semantic-ui to release a lighter version. Lazy option (smiles).

Open to comments from other users of Semantic UI and/or opentheme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants