Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mod('m') and elemMod('em') without second argument. #274

Closed
miripiruni opened this issue May 19, 2016 · 6 comments
Closed

Support mod('m') and elemMod('em') without second argument. #274

miripiruni opened this issue May 19, 2016 · 6 comments

Comments

@miripiruni
Copy link
Contributor

miripiruni commented May 19, 2016

From i-bem documentation:

A simple modifier is a special case when only the presence or absence of the modifier on the block is important, and its value is insignificant. An example is the modifier describing the ”disabled“ state: disabled. A modifier with an unspecified i-bem.js value is interpreted as boolean and automatically assigned the value true.

mod('m') is the same as mod('m', true)

@qfox
Copy link
Member

qfox commented May 19, 2016

mod('m') is the same as mod('m', true)

Are you sure? 😺

@miripiruni
Copy link
Contributor Author

A modifier with an unspecified i-bem.js value is interpreted as boolean and automatically assigned the value true.

@veged
Copy link
Member

veged commented May 19, 2016

no! you refer to setMod('m1'), which is exactly shortcut for setMod('m1', true), BUT mod('m1') in terms of "matching" is the same as mod('m1', '*')

it's not clear from documentation (sorry, that's my fault)

@miripiruni
Copy link
Contributor Author

Oh my…

@qfox
Copy link
Member

qfox commented May 19, 2016

Insane! <3 u all, ty for clarification!

@miripiruni
Copy link
Contributor Author

@miripiruni miripiruni added this to the 7.3.0 milestone Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants