-
Notifications
You must be signed in to change notification settings - Fork 0
bem.modifierSeparator
Version added: 1.0.0
The separator that is used for separating the name of the block or element from the name of the modifier.
By default in the BEM methodology for separating the name of the block or element from the name of the modifier the character "_" is used. This field allows to override this behavior and use any other character(s) as a separator.
Value: '_'
Type: String
Creates a CSS class of the element with the default separator:
Code:
var elementCssClass = bem.element('product', 'name', 'size_xs');
Result:
'product__name product__name_size_xs'
Creates a CSS class of the element with the new separator:
Code:
bem.modifierSeparator = '-';
var elementCssClass = bem.element('product', 'name', 'size_xs');
Result:
'product__name product__name-size_xs'
bem.elementSeparator
bem.modifierSeparator
bem.modifierValueSeparator
bem.block()
bem.blockModifier()
bem.element()
bem.elementModifier()
bem.getBlock()
bem.getElement()
jQuery.fn.addModifier()
jQuery.fn.blockName()
jQuery.fn.elementName()
jQuery.fn.getBlock()
jQuery.fn.getElement()
jQuery.fn.hasModifier()
jQuery.fn.isBlock()
jQuery.fn.isElement()
jQuery.fn.modifierValue()
jQuery.fn.removeModifier()