Skip to content

Commit

Permalink
Merge 0cfea09 into c58678c
Browse files Browse the repository at this point in the history
  • Loading branch information
Murdalay committed Jan 21, 2015
2 parents c58678c + 0cfea09 commit 1fac948
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 16 deletions.
69 changes: 69 additions & 0 deletions common.blocks/clearfix/clearfix.ru.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# clearfix

Блок реализует популярный CSS-прием **clearfix**, также известный как [Easy Clearing Hack](http://www.456bereastreet.com/archive/200603/new_clearing_method_needed_for_ie7/). Прием позволяет отменить обтекание для элементов с CSS-свойством `float`, без внесения изменений в исходную HTML-структуру документа.

Блок реализован в технологии CSS и подходит для использования в клиентских приложениях.

Блок можно использовать в качестве контейнера для элементов со свойством `float`, или примешивая его к такому контейнеру.

Пример использования в качестве контейнера:

```bemjson
({
block: 'header',
attrs: { style: 'border: 2px solid blue' },
content: 'Top element'
},
{
block: 'clearfix',
attrs: { style: 'border: 2px dotted yellow' },
content: [
{
block: 'float',
attrs: { style: { 'float: left', 'border: 1px solid green' }}
content: `Floating item 1`
},
{
block: 'float',
attrs: { style: { 'float: left', 'border: 1px solid green' }},
content: `Floating item 2`
}],
{
block: 'footer',
attrs: { style: 'border: 2px solid red' },
content: 'Footer'
}
});
```


Примешивание к блоку-контейнеру:

```bemjson
({
block: 'header',
attrs: { style: 'border: 2px solid blue' },
content: 'Top element'
},
{
block: 'some-container',
mix: [{ block: 'clearfix' }],
attrs: { style: 'border: 2px dotted yellow' },
content: [
{
block: 'float',
attrs: { style: { 'float: left', 'border: 1px solid green' }},
content: `Floating item 1`
},
{
block: 'float',
attrs: { style: { 'float: left', 'border: 1px solid green' }},
content: `Floating item 2`
}],
{
block: 'footer',
attrs: { style: 'border: 2px solid red' },
content: 'Footer'
}
});
```
16 changes: 0 additions & 16 deletions common.blocks/clearfix/clearfix.ru.wiki

This file was deleted.

0 comments on commit 1fac948

Please sign in to comment.