Closed blond closed 7 years ago
BEMDECL next should support string only format of declaration.
var normalize = require('bem-decl').normalize, decl = [ 'block', 'block_mod', 'block_mod-name_mod-val', 'block__elem' ]; normalize(decl, { version: 'next' }); // [ // { block: 'block' }], // { scope: 'block', modName: 'mod', modVal: true }], // { scope: 'block', modName: 'mod-name', modVal: 'mod-val' }], // { scope: 'block', elem: 'elem' }] // ]
This format should support custom naming conventions.
var normalize = require('bem-decl').normalize, csswizardry = { elem: '__', mod: '--' }, decl = [ 'block', 'block--mod', 'block__elem' ]; normalize(decl, { version: 'next', naming: csswizardry }); // [ // { block: 'block' }], // { scope: 'block', modName: 'mod', modVal: true }], // { scope: 'block', elem: 'elem' }] // ]
It is not the task of this package.
BEMDECL next should support string only format of declaration.
This format should support custom naming conventions.