Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
How to reproduce the problem:
- Set the layout to fixed-width in the info file
$zen-column-count: 24; $zen-gutter-width: 20px; $zen-grid-width: 960px;
- box-sizing: border-box (htc file downloaded, path set, definition to content-box commented out)
Write into blocks.scss
.block {
@include zen-grid-flow-item(8);
}
Result in block.css
.block {
(…)
width: 800%;
(…)
}
Did I made a mistake in my scss definition? The documentation says when fixed width is used, the only attribute is must define is the number of columns.
I try to analyze the math in _grids.scss of Zen, but it is a deeply cascaded formula… :o)
Comments
Comment #1
thamasHm. Math seems to be right. So I do not know where the problem lies.
Comment #2
Tunox CreditAttribution: Tunox commentedAccording to Grid generator your total width should be 964px. 960px won't add up for 24 columns with a 20px gutter.
Are you editing the scss in compass "mode"?
The good thing about using sass/compass is that when you toy around with zen-grid-width and save the file, the console/terminal will tell you if there's something wrong with the grid measures you're trying to apply.
If you haven't installed Ruby/SaaS/Compass, do it. Took me 5 minutes in Windows. Should be less on *nix flavour OS.
Comment #3
thamasDear Tunox,
It is a 24 column grid with 20px wide columns and 20px wide gutters.
Sass and Compass are installed and Compass is watching the folder of the theme, of course. The css generated by Compass.
Comment #4
thamasOK, I missed that there are warnings in the terminal. It had a problem widh IE legacy support and polyfill path, but it should be an other issue, so I just switched back to default settings: no polifyfill and box-sizing is set to content-box.
However it still has a warning:
The px unit setting (960px grid) seems to be not recognized. If I set the grid width to 960px and the column-count to 24 in _grids.scss (what I normally should not do, I know…) it works correctly.
Comment #5
JohnAlbinComment #6
echoz CreditAttribution: echoz commentedIs this addressed by “bugfix: Incorrect gutter for zen-grid-flow-item() when using fixed units.” which was the last commit to compass-zen-grids on github (Jun 25) that never made it to zen.
Comment #7
JohnAlbinLikely. See #2052291: Upgrade to Zen Grids 1.4
Comment #8
denix CreditAttribution: denix commentedI have upgraded to zen-grids 1.4 but the problem persists. :(
I have just realized that version 1.4 is from april this year and the bug has been addressed in june.
Comment #9
denix CreditAttribution: denix commentedComment #10
JohnAlbin