5.1.3 • Published 6 years ago

veams-utility-grid v5.1.3

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

Grid

Bourbon Neat provides a simple grid system, which you can use in your projects.

With u-grid there is implemented a mobile first class based system which is like Bootstrap or Foundation, but you are also flexible enough to just use mixins in your Sass or SCSS files.

In general u-grid.scss generates a set of grid column classes using namespaces.


Requirements

Documentation


Installation

Installation with Veams

veams install vu grid


SASS

Variables

CSS Output

In combination with the Sass map for all major breakpoints, a specific mixin creates our markup classes which has the following structure:

  • .{$grid-class-col}-[namespace]-[number] - for a column that covers a specific number of columns (e.g. 1-12 by default)
  • .{$grid-class-col}-[namespace]-{$grid-offset}-[number] - for pushing a col a specific number of columns (e.g. 1-11 by default)

Modifier Classes

You can add the following modifiers to u-grid-row|is-grid-row:

  • is-collapsed - Delete the margin on the left (can be set via settings.gridCollapsed)
  • is-equal-height - Add flex box styles to support equal heights for the columns

Usage Examples

  • is-col-mobile-s-12 is-col-mobile-xl-6 is-col-tablet-p-4 is-col-tablet-p-offset-4 is-col-tablet-l-3 is-col-tablet-l-offset-0

Fields

Grid Row

  • settings.gridPadding {Boolean} false - Add the margin to the left.
  • settings.gridClasses {String} - Modifier classes like is-equal-height.

Grid Col

  • colClasses {String} - Column and offset classes.

Example

Example for overwrite u-grid default settings in _vars.scss:

/* ===================================================
BREAKPOINT SETTINGS
=================================================== */
// Breakpoints
$bp-mobile-s: 320px;
$bp-mobile-l: 600px;
$bp-tablet-s: 768px;
$bp-desktop: 1230px;
$bp-desktop-l: $max-width;

// Breakpoints Map
$bp: (
	'mobile-s': (
        columns: 12,
        gutter: 20px,
        media: 320px
    ),
    'mobile-l': (
        columns: 12,
        gutter: 20px,
        media: 657px
    ),
    'tablet-s': (
        columns: 12,
        gutter: 20px,
        media: 768px
    ),
    'desktop-l': (
        columns: 12,
        gutter: 20px,
        media: 1024px
    ),
    'desktop': (
        columns: 12,
        gutter: 20px,
        media: 1440px
    )
);

$grid-breakpoints-defaults: $bp;
$grid-defaults: (
	columns: 12,
	gutter: 36px
);
5.1.3

6 years ago

5.1.2

6 years ago

5.1.1

6 years ago

5.0.1

7 years ago

5.0.0

7 years ago

4.0.0

7 years ago