Skip to content

Commit beaabbe

Browse files
author
blond
committed
docs(presets): use two-dashes preset for convention by Harry Roberts
1 parent a2e7bd8 commit beaabbe

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -394,16 +394,13 @@ Read more in the [Guidelines](http://cssguidelin.es/#bem-like-naming).
394394
Example:
395395

396396
```js
397-
var csswizardry = bemNaming({
398-
elem: '__',
399-
mod: { name: '--', val: '_' }
400-
});
397+
var twoDashes = bemNaming('two-dashes');
401398

402-
csswizardry.parse('block__elem'); // { block: 'block', elem: 'elem' }
403-
csswizardry.parse('block--mod_val'); // { block: 'block',
404-
// modName: 'mod', modVal: 'val' }
399+
twoDashes.parse('block__elem'); // { block: 'block', elem: 'elem' }
400+
twoDashes.parse('block--mod_val'); // { block: 'block',
401+
// modName: 'mod', modVal: 'val' }
405402

406-
csswizardry.stringify({ // 'block__elem--mod'
403+
twoDashes.stringify({ // 'block__elem--mod'
407404
block: 'block',
408405
elem: 'elem',
409406
modName: 'mod'

README.ru.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -392,16 +392,13 @@ myNaming.stringify({ // 'blockName-elemName--boolElemMod'
392392
Пример:
393393

394394
```js
395-
var csswizardry = bemNaming({
396-
elem: '__',
397-
mod: { name: '--', val: '_' }
398-
});
395+
var twoDashes = bemNaming('two-dashes');
399396

400-
csswizardry.parse('block__elem'); // { block: 'block', elem: 'elem' }
401-
csswizardry.parse('block--mod_val'); // { block: 'block',
402-
// modName: 'mod', modVal: `val` }
397+
twoDashes.parse('block__elem'); // { block: 'block', elem: 'elem' }
398+
twoDashes.parse('block--mod_val'); // { block: 'block',
399+
// modName: 'mod', modVal: `val` }
403400

404-
csswizardry.stringify({ // 'block__elem--mod'
401+
twoDashes.stringify({ // 'block__elem--mod'
405402
block: 'block',
406403
elem: 'elem',
407404
modName: 'mod'

0 commit comments

Comments
 (0)