Skip to content

qfox/bem-content

 
 

Repository files navigation

bem-content

![Gitter](https://badges.gitter.im/Join Chat.svg)

This README also available in russian.

Library for work with static content in BEM methodology.

Dependencies

Install

Take way like connecting with bem-core and bem-components libraries. Use bower-npm-install to install bem-components from GitHub or Bower register.

Add levels from bem-content to your make.js file:

[ 
    // base blocks functionality
	'libs/bem-content/common.blocks',
    // blocks with accessebility templates overriding
    'libs/bem-content/accessebility.blocks'
]

Easy example

Example for heading and paragpaph.

{ block : 'heading', content : 'This is heading of level 1' },
{
    block : 'paragraph',
    content : [
        'Simple text'
    ]
}

See more examples in promo.pages/index/index.bemjson.js (build it with bem make) or on landing page.

Calculating

Lib have block calc for calculating fonts sizes. Any sizes writed in rem. It's absolutely right way for fonts. For more info about math model you can watch here.

Customize

Lib very simple to customize. You can configure everything. To do this you need create block variables on one of levels in your project and override any variable in it. So, list of variables you can watch here.

Authors

Ideas

Please, talk about your ideas by GitHub issues.

MIT License

About

BEM blocks for right work with content

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 93.8%
  • CSS 5.3%
  • Shell 0.9%