Hi,
Just have to add this as a feature request as just having alpha and omega classes is not enough to make the column spacing correct on a mobile when nesting grids. This is the source from my site:
<div id="zone-content" class="zone zone-content clearfix container-24">
<div class="view-content">
<ul>
<li class="views-row views-row-1 views-row-odd views-row-first grid-12 gamma alpha column-1 row-1">content-here</li>
<li class="views-row views-row-2 views-row-even grid-12 gamma omega column-2 row-1">content-here</li>
<li class="views-row views-row-3 views-row-odd grid-12 gamma alpha column-1 row-2">content-here</li>
<li class="views-row views-row-4 views-row-even views-row-last grid-12 gamma omega column-2 row-2">content-here</li>
</ul>
</div>
</div>
As you can see, I have added a class 'gamma' which removes BOTH left and right margins. This is loaded up in global.css (using omega theme). As you know, alpha and omega classes are loaded up only when the screen size is bigger than mobile so those classes have no effect on mobile.
So, without an extra class which removes both left and right margins, on a mobile, your columns will have a 20px margin left OR right (depending on whether the column has class alpha or omega) because they are a nested grid already inside a grid-24 (or whatever width it is, grid-16, grid-10 etc...) which already adds a 10px margin either side before the columns within are loaded. The extra 'gamma' class makes sure all columns have only left and right 10px margin as expected.
Just a thought.
Sam.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | row-class-gamma.png | 41.33 KB | nlisgo |
Comments
Comment #1
nlisgo commentedIf you wish to add gamma to each of the rows then you can just add it to the 'Row class' field.
Comment #2
samwillc commentedHi nlisgo,
I know that's one way, that's how I did it, but I was thinking along the lines of a class to each column by default that will not conflict with any other view. I would have to add gamma to the row every time I create a new view. The class can be called anything, but has to be unique.
This is important if people (like myself) use nested grids. This is an issue that hasn't been solved programatically yet within these responsive themes so that grids are 'aware' when they are nested.
Would just take a bit of the leg work out, that's all. :)
Sam.
Comment #3
nlisgo commentedWhat you seek can actually be achieved a couple of ways but certainly by using the advanced settings of this plugin. Simply add the line:
1|gamma
That will have the desired effect. I have yet to document the full capabilities of the advanced settings but it is designed to allow you to use different column setups for different screen resolutions. I will perhaps create another video to showcase this. The advanced settings is quite powerful and could be used to generate the markup that would need to allow you to easily present a 4 column layout for a wide resolution, 3 column for normal, 2 column for narrow and 1 column for mobiles.
The other way to achieve the markup that you desire is to replace the value in the Column class prefix field to:
gamma column-
Since the column number just gets added to the end of the string and this value is output for every item the gamma would appear in every result.
Hope that makes sense. Sorry for the late reply.
Comment #4
samwillc commentedThanks for the reply.
It would be good to watch a video on the advanced features.
Sam.
Comment #5
nlisgo commentedI will be presenting on this module hopefully at BAD camp UK http://badcampuk.net/
That's if they select my proposal :) So hopefully I will have something to post up soon.
Comment #6
nlisgo commented