Our fully responsive grid for UCLA digital properties has 12 columns and 5 breakpoints. It has been designed to easily adapt to different screen sizes and to ensure consistent layouts across devices.
The grid has three main parts: columns, gutters, and margins.
We created shorthand variables for common breakpoints in the following chart.
Viewports | Viewport Width | SCSS Breakpoint Variable |
---|---|---|
Extra Small / Mobile Devices | 480px | “xs” |
Small / Mobile Devices | 600px | “sm” |
Medium / Tablet Devices | 768px | “md” |
Large / Desktop or Laptop Devices | 1024px | “lg” |
Extra Large / Presentation Mode | 1280px | “xl” |
// CSS Example Breakpoint Usage
@media (min-width: 768px) {
display: inline-block;
}
// SCSS Example Breakpoint Usage
@media (min-width: breakpoint-min(md)) {
display: inline-block;
}
In order to use the column grid you must wrap the page area with the “ucla campus” class.
// Full Width
<style>
.ucla.campus div {
background: #757575;
text-align: center;
color: #fff;
padding: 5px 0;
}
</style>
<div class="ucla campus">
<div class="col span_12_of_12">
1 of 1
</div>
</div>
// Two Columns
<div class="ucla campus">
<div class="col span_1_of_2">
1 of 2
</div>
<div class="col span_1_of_2">
2 of 2
</div>
</div>
// Three Columns
<div class="ucla campus">
<div class="col span_1_of_3">
1 of 3
</div>
<div class="col span_1_of_3">
2 of 3
</div>
<div class="col span_1_of_3">
3 of 3
</div>
</div>
// Twelve Columns Responsive EXAMPLE
<div class="ucla campus">
<div class="col span_6_of_12">
This is column 1, that spans 6 columns of 12.
</div>
<div class="col span_3_of_12">
This is column 2, that spans 3 columns of 12.
</div>
<div class="col span_3_of_12">
This is column 3, that spans 3 columns of 12.
</div>
</div>
You can place columns within columns.
// Body Layout
<div class="ucla campus">
<div class="col span_9_of_12">
<div class="ucla campus">
<div class="col span_12_of_12">
Body Content 12 of 12
</div>
</div>
<div class="ucla campus">
<div class="col span_6_of_12">
Body Content 6 of 6
</div>
<div class="col span_6_of_12">
Body Content 6 of 6
</div>
</div>
</div>
<div class="col span_3_of_12">
Menu content
</div>
</div>