Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Inna Belaya
committed
Aug 26, 2014
1 parent
393a688
commit 0174acc
Showing
4 changed files
with
171 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# z-index-group | ||
|
||
`z-index-group` block is used to create several layers on a page for blocks representation. | ||
This block can be mixed only with blocks that have a modifier `position`. | ||
|
||
`level` modifier controls the layer position on the `z`-axis. Integer number from 0 to 9 can be used as a value for 'level' mode. When blocks overlap, z-order determines which one covers the other. A block with a larger `level` value covers a block with a lower one. If two blocks have the same `level` value, a block that is declared in BEMJSON declaration lower will cover the other one. | ||
|
||
`z-index-group` block allows a user to open new elements on a layer that is specified in `level` modifier value. For example, if parent block that initiates [popup](../popup/popup.ru.md) is mixed with `{ block : 'z-index-group', mods : { level : 2 } }`, `popup` block will be shown at the second level (`2 * 1000`). | ||
|
||
The example below shows popup block that does not cover another block (e.g., block `header`): | ||
|
||
```js | ||
{ | ||
block : 'popup', | ||
mix : { block : 'z-index-group', mods : { level : 1 } }, | ||
mods : { autoclosable : true, theme : 'normal' }, | ||
content : 'I\'m under the block with \`level : 2\` value !' | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# z-index-group | ||
|
||
Блок `z-index-group` используется для формирования нескольких слоев отображения блоков на странице. Применяется только к тем блокам, которым может быть установлено значение `position`. Каждый слой может находиться как выше, так и ниже других объектов веб-страницы. Их размещением по `z`-оси управляет модификатор `level`. | ||
|
||
В качестве значения модификатора `level` используются целые числа от 0 до 9 включительно. Чем больше значение, тем выше находится слой по сравнению с теми слоями, у которых оно меньше. При равном значении `level` на переднем плане находится тот элемент, который в BEMJSON задекларирован ниже. | ||
|
||
Блок `z-index-group` с указанным значением модификатора `level` примешивается к позиционированному элементу веб-страницы и позволяет открывать новые элементы относительно уровня слоя, указанного в значении `level`. Например, если родителю, вызывающему [popup](../popup/popup.ru.md), примешан `{ block : 'z-index-group', mods : { level : 2 } }`, то попап вызывается уже от второго уровня (`2 * 1000`). | ||
|
||
На примере ниже показана ситуация, когда открывающийся попап не перекрывает другой блок (например, шапку), находящийся на странице: | ||
|
||
```js | ||
{ | ||
block : 'popup', | ||
mix : { block : 'z-index-group', mods : { level : 1 } }, | ||
mods : { autoclosable : true, theme : 'normal' }, | ||
content : 'I\'m under the block with \`level : 2\` value !' | ||
} | ||
``` |