Skip to content
This repository has been archived by the owner on Jan 13, 2018. It is now read-only.

Commit

Permalink
Fix css tech to create css selector with modifier when it is specifie…
Browse files Browse the repository at this point in the history
…d but its value isn't (close #425)
  • Loading branch information
Vladimir Alaev committed Sep 10, 2013
1 parent 044260f commit dfd3681
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/techs/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports.Tech = INHERIT(Tech, {

vars.Selector = '.' + vars.BlockName +
(vars.ElemName? '__' + vars.ElemName : '') +
(vars.ModVal? '_' + vars.ModName + '_' + vars.ModVal : '');
(vars.ModName? ('_' + vars.ModName + (vars.ModVal? '_' + vars.ModVal: '')): '');

return Template.process([
'{{bemSelector}}',
Expand Down
2 changes: 1 addition & 1 deletion lib/techs/v2/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports.techMixin = {

vars.Selector = '.' + vars.BlockName +
(vars.ElemName? '__' + vars.ElemName : '') +
(vars.ModVal? '_' + vars.ModName + '_' + vars.ModVal : '');
(vars.ModName? ('_' + vars.ModName + (vars.ModVal? '_' + vars.ModVal: '')): '');

return Template.process([
'{{bemSelector}}',
Expand Down

0 comments on commit dfd3681

Please sign in to comment.