Lazy Columns for Canvas
Tue Aug 13 2024 16:53:16 GMT+0000 (Coordinated Universal Time)
Saved by
@cherylcolan
#html
<div class="content-box">
<div class="grid-row">
<div class="col-xs">
<div class="styleguide-section__grid-demo-element">Column 1 content</div>
</div>
<div class="col-xs">
<div class="styleguide-section__grid-demo-element">Column 2 content</div>
</div>
<div class="col-xs">
<div class="styleguide-section__grid-demo-element">Column 3 content</div>
</div>
</div><!--end of grid row-->
</div><!--end of content box-->
content_copyCOPY
Here's how this works:
1. Make a div with a class of "content-box".
2. Put a div with a class of "grid-row" inside it - that makes a row that you can divide into columns.
3. Inside that "grid-row" div, add up to 12 divs with a class of "col-xs" - each one is a column.
The "lazy" part is that the grid will evenly space the columns. When the screen isn't wide enough, the columns will start to stack vertically.
The example above will make 3 columns because there are 3 "col-xs" divs inside the "grid-row".
The source of this snippet is the Canvas style guide (URL below for MCCCD), but it has since been removed. It was referred to as "Lazy Columns."
https://maricopa.instructure.com/styleguide
Comments