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

I wouldn't recommend using this #2

Closed
peenBroken opened this issue May 22, 2013 · 1 comment
Closed

I wouldn't recommend using this #2

peenBroken opened this issue May 22, 2013 · 1 comment

Comments

@peenBroken
Copy link

I started to use GPMD as a base for my theme until I realized that the theme got the most crappy CSS I came across in years. The CSS is split into 9(!) files, lots of classes and identifiers get overwritten dozens of times, some files are about 4000 lines long, remember this is supposed to be a more or less blank base theme.
It’s a complete mess, there’s lots of junk in the CSS files that isn’t even used. The same is true for config and HTML files. It took me 2,5h to figure out, why a multistore wasn’t working correctly with this theme, just to give another example.
It looks like it may have been stripped down from a complete template.

@matt-bailey
Copy link
Contributor

As you can see this theme hasn't been worked on in 8 months and it was first started over 12 months ago. We all go through learning processes, improving our understanding and workflow. If we were to create a similar theme now we would do a number of things differently. That said your comments are, for the most part, ill informed.

The theme is based on the base/default Magento theme (community edition). It inherits a lot from the base/default theme - All we've done is to add CSS for a responsive layout and some simple styling. We've not changed the way Magento does markup in the template files, or changed the classes that it uses - we've embellished it as little as possible. In fact we tried to override as few of the template files as possible. If you don't like this then go and complain to Magento.

A lot of classes get overridden because it uses media queries to change the layout/styles at certain widths - that's the way media queries work.

You quite rightly point out that there are 9 css files and that this is too many (although 5 of these are standard to the base/default Magento theme - styles, styles-ie, print, widgets and demo). The idea behind this was to make working on the CSS easier and more modular, so we created base, typography, layout. We also added the font-awesome icon font. Of course now we would combine most of these into one file, but at the time we didn't think of it.

Which brings me to your 4000 lines long comment. You are of course referring to the styles.less file. I suspect you've never used LESS or a CSS preprocessor before or you would have realised that the LESS files have been compiled into minified CSS files, so in fact styles.css is only 553 lines long compared the standard Magento styles.css files which is 1788 lines long! You would also have realised that you yourself could have simply combined all the .less files into one file yourself by using @import in the main styles.less file - that's what we do now.

I agree that the CSS could have been better written in places - the main problem is that at the time I was overly enthusiastic with my nesting of code (something which you can do in LESS). Like a child in a sweetshop I got a bit carried away, but now when I write CSS I'm a lot less 'specific' and a lot more DRY. That said, how you style your site is up to you - the idea isn't that you just use our 'crappy' styles as-is, they're just there as a starting point - if you don't like them, don't use them. Remove styles.css and you'll still have layout.css controlling the responsive layout.

As to "junk in the CSS files that isn't even used" - styling exists for all the elements in the base/default Magento theme (This one: http://demo.magentocommerce.com/). If you don't set up certain elements on the front-end the styling still remains in the CSS files. If you don't need the styling for certain things then just delete them.

What little layout config there is can be found in local.xml, which is the correct way to do things. I fail to see how that's hard to understand? Also, as I said before the idea wasn't to rewrite the Magento template files, but to simply override the minimum possible to make a responsive site. To create a completely bespoke responsive Magento theme from scratch and rewrite all the Magento template files would be a mammouth task.

I'm not quite sure why I've spent so much of my time justifying myself to you, but there you go. May I make a suggestion though? Next time you feel you want to be rude about something that someone else has spent a lot of their valuable time on and decided to put it out there for FREE so that others might benefit from it, just keep your comments to yourself and remember that you yourself haven't contributed one single thing to the community on Github. Or, if you have to say something be constructive, and above all, just try and be nice...

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