Skip to content

Commit

Permalink
get block fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zgabievi committed Apr 6, 2016
1 parent 8f1c93b commit 3e0da2b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
8 changes: 4 additions & 4 deletions _bem.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

// Functions
@import "functions/bem-index";
@import "functions/get-block";
@import "functions/has-state";
@import "functions/has-pseudo";
@import "functions/str-replace";
@import "functions/is-modifier";
@import "functions/is-element";
@import "functions/has-state";
@import "functions/has-pseudo";
@import "functions/is-block";
@import "functions/get-block";
@import "functions/str-replace";
@import "functions/math-min";
@import "functions/explode";
@import "functions/implode";
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-bem",
"version": "2.5.0",
"version": "2.5.1",
"main": "_bem.scss",
"description": "Collection of BEM Mixins & Helpers",
"authors": [
Expand Down
11 changes: 10 additions & 1 deletion functions/_get-block.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,14 @@
/// @returns {String} - Block element

@function get-block($selector) {
@return str-slice($selector, 2, bem-index($selector) - 1);
$block: str-slice($selector, 2, bem-index($selector) - 1);

//
@while (is-block($block) == false) {

//
$block: str-slice($block, 0, bem-index($block) - 1);
}

@return $block;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-bem",
"version": "2.5.0",
"version": "2.5.1",
"description": "Collection of BEM Mixins & Helpers",
"main": "_bem.scss",
"repository": {
Expand Down

0 comments on commit 3e0da2b

Please sign in to comment.