Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>With the Sass Mixins you have to use media queries to explicitly change the grid. The way I approached this is to do a Mobile First site, then to duplicate the Sass code that defines the grid into 2 media queries like so:</p> <pre><code>// Mobile Grid @media only screen and (max-width: 768px) { ... } // Desktop &amp; Tablet Grid @media #{$small} { ... } </code></pre> <p>I couldn't find any clear examples of how this works. From what I gathered you should be able to define the grid in Sass and then override it with only the <code>@media #{$small} {}</code> media query, however in practice I could not get it to work. I tried having the media query before the other grid, after, etc and what the result was is that the first time you set the grid is the way it stays.</p> <p>Here is a longer example. In the case of the <code>#dashboard</code> it is stacking and centered on mobile and 3 column on desktop / tablet. This would be <code>class="small-10 small-centered large-4 columns"</code> for using presentational classes.</p> <pre><code>// Mobile Grid @media only screen and (max-width: 768px) { #dashboard { @include grid-row; &amp; &gt; #stats { @include grid-column(10, false, true); } &amp; &gt; #records { @include grid-column(10, false, true); } &amp; &gt; #results { @include grid-column(10, false, true); } } } // Desktop &amp; Tablet Grid @media #{$small} { #dashboard { @include grid-row; &amp; &gt; #stats { @include grid-column(4, false, false); } &amp; &gt; #records { @include grid-column(4, false, false); } &amp; &gt; #results { @include grid-column(4, false, false); } } } </code></pre> <p>NOTE: you could expand upon this and have more breakpoints using the mixins but this seems to simulate the default Zurb F4 presentational class behavior.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload