Comments (9)
I did not get 2.
{ block: 'button', mod: { name: 'size', val: false } }
vs
{ block: 'button', modName: 'size', modVal: false }
Why less confusion?
from bem-sdk.
@apsavin I think that now { block: 'button', modName: 'size', modVal: false }
will consider equivalent { block: 'button', modName: 'size' }
.
If for boolean modifiers will the short form { block: 'button', mod: 'disabled' }
then no one will want to write { block: 'button', mod: { name: 'disabled', value: true }
or { block: 'button', mod: { name: 'disabled', value: false }
and the full form will always be used for key-value
modifiers.
from bem-sdk.
👍
from bem-sdk.
@blond isn't it just yet one more format for absolutely same purpose?
are there real places one must write such form manually (except for i-bem
which you won't change anyways)?
from bem-sdk.
@tadatuta i-bem
works with BEM entities, but bem-naming
works with BEM entity parts. It's means that the syntax does not necessarily coincide.
For example, i-bem
can use mods: { key: 'value' }
.
In addition the i-bem
and bem-naming
have different users. It's means that the consistency of the formats is not important in this case.
In my opinion the mod
field is better than modName
+ modVal
fields. So I still want to make mod
field.
from bem-sdk.
@tadatuta also i-bem
can support mod
field with old modName + modVal
option
from bem-sdk.
also i-bem can support mod field with old modName + modVal option
?
from bem-sdk.
bem-entity-name use mod
field and support modName
and modVal
for backward compatibility.
I think bem-naming
must do the same.
from bem-sdk.
Fixed in #148
from bem-sdk.
Related Issues (20)
- NamingConvention and defaultLayer
- entity-name: type of modifier value HOT 3
- Update supported node js version
- sdk.naming.presets: Use lowerCamelCase notation for two-dashes preset
- naming.presets: rewrite for typescript
- naming.entity.stringify: Use assert for validation
- decl.normalize v2 every time adds _mod_true HOT 7
- decl.normalize adds extra element before element_modifier HOT 1
- walk: Resolve (or even realpath) passed in config and levels paths
- walk: asArray for returning promise with an array and all founds
- decl.normalize don't handle elems: { elem, mod, val } at v2
- decl.normalize failed on elem: elem, mods: Array
- keyset: remove paramedKey
- keyset: add docs HOT 1
- keyset: add merge
- @bem/sdk.naming.cell.match: Некорректно обрабатывает файлы с react неймингом HOT 3
- Соглашение об именовании для Two Dashes style HOT 1
- https://ru.bem.info/toolbox/sdk/bem-config/ - Оцените статью ★★★★★
- Security vulnerability in dependency of bem (via bem-config which is deprecated)
- naming.entity.parse и React preset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bem-sdk.