Is there a responsive grid system in Magento's new 1.9 RWD theme?
If this new theme is not using a grid system how is the theme responsive?
I've looked through the CSS & SCSS & I can't find one?
Is there a responsive grid system in Magento's new 1.9 RWD theme?
If this new theme is not using a grid system how is the theme responsive?
I've looked through the CSS & SCSS & I can't find one?
No, there is not a responsive grid system in the new CE 1.9/EE 1.14 RWD theme unfortunately. Grid systems create a number of reusable classes often named using numbers for the amount of columns available, for example in a 12 column grid a grid system will often use something like .col1, .col2, .... .col12 each corresponding to a fixed (px) or fluid (%) width. It then adds media queries to tell those numbered columns when to become full width of the screen a.k.a when to "stack" vertically.
The RWD theme instead takes what I would call an "as needed" approach meaning when an element needs to change its width based on screen size it is listed out individually in the CSS.
For example in styles.css:
@media only screen and (max-width: 770px) {
.col2-set .buttons-set .button,
.col2-set .buttons-set .button2 {
float: none;
width: 100%;
margin-left: 0;
margin-right: 0;
}
}
While there is debate about using a grid system for the entire layout of a Magento site if you are building a new responsive theme based on RWD you most likely will benefit from a grid system if your design will use a number of CMS pages.
You can use any grid system out there but I would recommend going with the smallest and simplest solution possible. One option is: http://www.responsivegridsystem.com/calculator/
Choose the number of columns you want (12 is most likely the popular choice) and your margin. The calculator will produce the CSS you need for a small light weight grid system. This one uses 480px as its only break point but you can easily customize this in the CSS and add additional break points as your design requires.
You can choose to place this in your own CSS file (and then load it only on the pages you require it on) or add it to an existing CSS file depending on your organizational preferences.
The Magento RWD theme is not built on an existing framework such as Bootstrap/Foundation or responsive grid system such as Unsemantic/Golden Grid System.
The main place where grids are used in the Magento RWD theme is the product listing page. You can see the Sass for this in skin/frontend/rwd/default/scss/module/_product-list.scss
.
If you want to implement a custom grid system in your theme, you can either write the basic Sass/CSS required to do this. A quick Google search will turn up a number of simple responsive grid structures. Alternatively, you can use a responsive grid system, although this is often overkill for most applications.
Based on several opinions within the industry, including my own, grid systems within Magento isn't always a good idea. There was a great talk from the MD of Meanbee at Magento Live UK this year on responsive design and he touched on grid systems.
/skin/frontend/rwd/default/js/app.js
Commented
May 26, 2015 at 19:27
There are a few SASS grid systems out there with settings, mixins etc to add to your Magento 1.9 theme based on the rwd theme such as gridle: http://gridle.org/ or you can opt like I do to create your own simple grid system from your own partials.