ECL Grid
Use a grid to give your design a basic underlying structure. By placing your design elements on the invisible lines of a grid, you will create a more structured and coherent composition.
The ECL Grid uses Bootstrap v4’s grid. Designs are based on the 12-column Bootstrap grid system.
We use 5 breakpoints, of which 3 of them are native to Bootstrap.
| Layout | Widths | Media queries |
|---|---|---|
| Extra small | Any | |
| Small | Bigger than 479px | @media (min-width: 480px) |
| Medium | Bigger than 767px | @media (min-width: 768px) |
| Large | Bigger than 991px | @media (min-width: 992px) |
| Extra large | Bigger than 1199px | @media (min-width: 1200px) |
Bootstrap includes a responsive, mobile first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases.
It includes predefined classes for easy layout options, as well as powerful mixins for generating more semantic layouts.
Refer to
Bootstrap documentation for
understanding the general concepts. When using the grid of ECL, use .ecl-
namespace in front of Bootstrap’s classes in order to avoid collisions.
<div class="ecl-container">
<div class="ecl-row">
<div class="ecl-col">
1 of 2
</div>
<div class="ecl-col">
1 of 2
</div>
</div>
<div class="ecl-row">
<div class="ecl-col">
1 of 3
</div>
<div class="ecl-col">
1 of 3
</div>
<div class="ecl-col">
1 of 3
</div>
</div>
</div>
/* No context defined for this component. */
<div class="ecl-container">
<div class="ecl-row">
<div class="ecl-col">
1 of 2
</div>
<div class="ecl-col">
1 of 2
</div>
</div>
<div class="ecl-row">
<div class="ecl-col">
1 of 3
</div>
<div class="ecl-col">
1 of 3
</div>
<div class="ecl-col">
1 of 3
</div>
</div>
</div>
-
Content:
// // Grid mixins // @import 'mixins/grid-framework'; @import 'mixins/grid'; // Container widths // // Set the container width, and override it for fixed navbars in media queries. .ecl-container { @include ecl-make-container(); @include ecl-make-container-max-widths(); } // Fluid container // // Utilizes the mixin meant for fixed width containers, but without any defined // width for fluid, full width layouts. .ecl-container-fluid { @include ecl-make-container(); } // Row // // Rows contain and clear the floats of your columns. .ecl-row { @include ecl-make-row(); } // Remove the negative margin from default .row, then the horizontal padding // from all immediate children columns (to prevent runaway style inheritance). .ecl-no-gutters { margin-left: 0; margin-right: 0; > .ecl-col, > [class*='ecl-col-'] { padding-left: 0; padding-right: 0; } } // Columns // // Common styles for small and large grid columns @include ecl-make-grid-columns(); - URL: /components/raw/ecl-grid/_grid.scss
- Filesystem Path: framework/layout/ecl-grid/_grid.scss
- Size: 985 Bytes
- Handle: @ec-europa/ecl-grid
- Preview:
- Filesystem Path: framework/layout/ecl-grid/ecl-grid.twig