How can i use SGS without every nested div spawning it’s own smaller grid? I get that it’s more powerful than that but for this case, specifically I’d like to set the width of deeply buried paragraph
container to span 5 columns of the original .main-wrap div container’s grid.
for example if i do this to my paragraph which is nested 4 containers deep,
p.mynested_para {
@include grid-span(5, 1) /* i want this to refer to the .main container’s grid */
}
it comes out tiny! i’ve been looking through documentation but haven’t found how to do this yet.
You have to provide a context: how many columns are available for this element.
There are two ways:
1. In the
grid-spanmixinThe
grid-spanmixin accepts up to four arguments:So what you need to do is:
...where
8is the number of columns available in the current context.2. Using the
layoutmixinIf you have multiple elements to span in one context, it is tedious to mention the context for every of them.
So instead of this:
You can do this:
Documentation
Read about these features in more detail here:
https://github.com/at-import/Singularity/wiki/Spanning-The-Grid#context-overrides