bem-site / bem-method

BEM — a methodology how to develop web projects applicable for any technology
http://bem.info
605 stars 176 forks source link

I propose missed terminology #552

Open a-x- opened 7 years ago

a-x- commented 7 years ago

Let's start to use a few new terms.

from: https://gist.github.com/a-x-/78933daf585d236f62831acf078a88d8#complete-formed-bem-blocks-literals

  1. bemslug {String} e.g. 'block__elem_mod_val' slug is a short notation, //wiki/slug
  2. extended-bemslug {String} e.g. 'block_mod_val__elem' it's used in the BH

from https://gist.github.com/a-x-/78933daf585d236f62831acf078a88d8#partial-bem-blocks-declarators-literals-tenorokи:

  1. masked-bemslug {String} e.g. block_* (a mod of block, not elem) etc. (see more)

  2. bemjson constrains:

    • bemjson-name {Object} {block: 'block', elem: 'elem', modName: 'mod', modVal: 'val'} — single block applicator/matcher declaration
    • bemjson-decl {Object} {block: 'block', elem: 'elem', elemMods: {mod:'val', mod2: 'val2'}} — multiple blocks applicator/matcher declaration
    • bemjson-def {Object} {block: 'block', elem: 'elem', elemMods: {mod:'val'}, content: [...],,,} — general bemjson block definition
a-x- commented 7 years ago

/cc @zxqfox @blond @tadatuta

a-x- commented 7 years ago

bemslug BNF like spec: https://gist.github.com/a-x-/78933daf585d236f62831acf078a88d8#bemslug-separators-schemes

qfox commented 7 years ago

image

a-x- commented 7 years ago

qfox commented 7 years ago
  1. bemslug {String} e.g. 'block__elem_mod_val'
  2. extended-bemslug {String} e.g. 'block_mod_val__elem'

Not sure who needs this and why you need to operate with string representations of BEM entities.

  1. masked-bemslug {String} e.g. block_* (a mod of block, not elem) etc. (see more)

Even more confused why we need this in methodology.

  1. bemjson constrains:
    • bemjson-name {Object} {block: 'block', elem: 'elem', modName: 'mod', modVal: 'val'} — single block applicator/matcher declaration

This is exactly the same what we call BEMEntityName.

  • bemjson-decl {Object} {block: 'block', elem: 'elem', elemMods: {mod:'val', mod2: 'val2'}} — multiple blocks applicator/matcher declaration

This is Node for sure, absolutely not a decl.

  • bemjson-def {Object} {block: 'block', elem: 'elem', elemMods: {mod:'val'}, content: [...],,,} — general bemjson block definition

What is the difference between 5 and 6? This is Node again.

a-x- commented 7 years ago

ok, let's keep BEMEntityName, and we not need bemjson-name so, BEMEntityName is for call one entity by name and BEMEntityNode is for call multiple entities finnaly, BEMEntityDef stands for definition entity, it's not for just call them.

a-x- commented 7 years ago

The string representations of BEM entities is too long and it's not ready for code term And yes, i see more cases, when we need term for

a-x- commented 7 years ago

I need a bemslug here for example. Help me. What are you think, guys?

qfox commented 7 years ago

BEMEntityNode, BEMEntityDefBEMJSONNode ?

tadatuta commented 7 years ago

I don't think we should extend methodology with new terms if there's just so few cases for them.

a-x- commented 7 years ago

I have many cases. l'll gather them here in the future until the term will become obvious