singularitygs - Still confused with nested grids -


i've found time test singularity, , im problem had before cant find obvious solution.

my issue nested grids. let's have simple 12 column grid

$grids: add-grid(12 @ $break2); 

and layout uses main content area extends 9 of 12 columns:

@include breakpoint($break2) {     @include grid-span(9, 3);     border: 1px solid red; } 

the, inside content area, need create section divided in 3 columns, means each article inside span 3 columns of parent container (which 9 of 9 columns).

i've tried following code, cant work.

.highlights{     overflow: hidden;     border: 1px solid black;      article{          @include float-span(3);          &:nth-child(3n){             @include float-span(1, 'last');         }     } } 

my goal have simple declaration, have generic article declaration every article, passing rule last article in each row i've done above.

maybe confusion because im used current grid system im using, can this. what's best , pratical way nest grids can align parent elements?

so issue you're having haven't changed grid context , still using global 12 column grid context @ point. need change grid context 9 you're inside 9 column grid. following should fix problem:

.highlights{   overflow: hidden;   border: 1px solid black;    article{     @include layout(9) {       @include float-span(3);        &:nth-child(3n){         @include float-span(1, 'last');       }     }   } } 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -