# enb-bem-grid

> [![Join the chat at https://gitter.im/bem-incubator/bem-grid](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/bem-incubator/bem-grid?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Latest version **2.2.1** (published 2016-01-19) · 0 weekly downloads

## Install

```sh
npm install enb-bem-grid
pnpm add enb-bem-grid
yarn add enb-bem-grid
bun add enb-bem-grid
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.1 |
| Published | 2016-01-19 |
| First published | 2015-12-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10 |
| Dependencies | 9 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | verybigman |

## Links

- npm: https://www.npmjs.com/package/enb-bem-grid
- npm.io page: https://npm.io/package/enb-bem-grid

## Dependencies (9)

- [lost](https://npm.io/package/lost.md) ^6.5.0
- [bower](https://npm.io/package/bower.md) ^1.6.5
- [cssnext](https://npm.io/package/cssnext.md) ^1.8.0
- [enb-postcss](https://npm.io/package/enb-postcss.md) ^0.2.0
- [postcss-for](https://npm.io/package/postcss-for.md) ^1.0.1
- [postcss-mixins](https://npm.io/package/postcss-mixins.md) ^0.3.0
- [postcss-nested](https://npm.io/package/postcss-nested.md) ^0.3.2
- [autoprefixer-core](https://npm.io/package/autoprefixer-core.md) ^5.2.1
- [postcss-simple-vars](https://npm.io/package/postcss-simple-vars.md) ^0.3.0

## Recent versions

- 2.2.1 (latest) — 2016-01-19
- 2.2.0 — 2015-12-07

## README

# bem-grid

[![Join the chat at https://gitter.im/bem-incubator/bem-grid](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/bem-incubator/bem-grid?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![Build Status](https://travis-ci.org/bem-incubator/bem-grid.svg?branch=master&style=flat)](https://travis-ci.org/bem-incubator/bem-grid)

BEM methodology for [Lost Grid](https://github.com/corysimmons/lost).

## Usage

Like Twitter Bootstrap:

1. `bower install --save bem-grid`
2. `<link rel="stylesheet" href="./bower_components/bem-grid/dist/bem-grid.css">`

As [ENB](https://github.com/enb-make/enb) module:

1. `npm i --save-dev enb-bem-grid`
2. Add `enb-bem-grid` after any css builder
``` js
[require('enb-bem-grid'), {
    config : {
        maxWidth : '1100px',
        gutter : '10px',
        flex : 'flex'
    }
}]
```
Example [config](https://github.com/bem-incubator/bem-grid/blob/master/.enb/make.js#L34-L47) file [ENB](https://github.com/enb-make/enb) with [postcss](https://github.com/postcss/postcss) builder.

## Easy example

``` html
<div class="row">
    <div class="row__col row__col_mw_6">left column</div>
    <div class="row__col row__col_mw_6">right column</div>
</div>
```

``` javascript
// bemjson
{
    block : 'row',
    content : [
        {
            elem : 'col',
            mods : { mw : 6 },
            content : 'left column'
        },
        {
            elem : 'col',
            mods : { mw : 6 },
            content : 'right column'
        }
    ]
}
```

## Row

__Useful mods for row block:__

- __(s|m|l|xl|xxl)al__ - align cols to left on needed displays
- __(s|m|l|xl|xxl)ac__ - align cols to center on needed displays
- __(s|m|l|xl|xxl)ar__ - align cols to right on needed displays

- __(s|m|l|xl|xxl)vat__ - align cols vertically to top on needed displays
- __(s|m|l|xl|xxl)vam__ - align cols vertically to middle on needed displays
- __(s|m|l|xl|xxl)vab__ - align cols vertically to bottom on needed displays

__Useful mods for col element:__

- __(s|m|l|xl|xxl)__ - auto width on needed displays
- __(s|m|l|xl|xxl)w__ - width on needed displays, 0 hide col on this device
- __(s|m|l|xl|xxl)o__ - offset on needed displays

- __(s|m|l|xl|xxl)of__ - order first this col on needed displays
- __(s|m|l|xl|xxl)ol__ - order last this col on needed displays

### Authors

- Anton Winogradov ([verybigman](https://github.com/verybigman)) @awinogradov

### Ideas

Please, talk about your ideas by GitHub [issues](https://github.com/bem-incubator/bem-grid/issues).

### [MIT](http://en.wikipedia.org/wiki/MIT_License) License

---
_Source: https://npm.io/package/enb-bem-grid · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
