1

I've finally upgraded to 1.9 and am starting on a new responsive theme for my store based on the 1.9 rwd theme. It looks like eric and the llamas have done a great job.

I took a look at the styles.css file and it seems huge (11350 lines!) i currently have compass set to expanded and production. The old styles was somewhere around 1500 lines so i'm really asking 2 questions

  1. is this expected? have i just made a big mistake on my compass config?
  2. is this size style sheet really acceptable for a e-comm store?

and yes, i know thats techincally 3 questions :-)

TIA

  • 10k lines is ridiculous. For a theme that should be mobile first, it's incredibly poorly thought out. You would be far better dropping the entire stylesheet and theming it properly, mobile first, dropping all the additional JS whilst you are at it. – choco-loo Oct 16 '14 at 20:43
  • That was sort of my concern, but i know Eric is no fool. I would be interested in other magento folks input on this – Dean Oct 16 '14 at 20:49
  • Actually, i just changed to output style:compact and it drops to 4300 lines, and an awful lot of those are comments. might be a false alarm! – Dean Oct 16 '14 at 21:25
  • Perhaps look at the output file size and draw a conclusion from that? – choco-loo Oct 16 '14 at 21:39
  • Minified output from 1.9 is around 145kb, 1.6.2 minified is around 80kb, so not as extreme a difference as i was expecting, but still a big jump up – Dean Oct 17 '14 at 11:17
2

The styles.css files from older Magento versions are about 1200 - 1800 lines (I just had a look at CE 1.8.1.0).

skin/frontend/rwd/default/css/styles.css in the current Magento version CE 1.9.0.1 has 9714 lines by default which is a bit less as you mentioned.

  1. Your 11350 lines sound reasonable, despite the fact that there are ~1600 lines more compared to the standard styles.css file from above. This could maybe be realted to the compass settings expandend/production. The production config should be minified so there should not be so much whitespace/extra lines.
  2. Keep in mind that there is not only one design which is included in the CSS, but multiple versions for various screen sizes. That makes of course more lines. It's not a question on how much lines you have in your stylesheet, it's about how good your CSS is written. Just imagine you include 5 different images for 5 different resolutions - that would make more trouble when it comes to loading times instead of some kilobyte of CSS (text).
  • Thanks for confirming its expected, and the production setting point does make sense. – Dean Oct 16 '14 at 20:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.