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

Provide a way to support custom modifier separator #69

Closed
qfox opened this issue Jan 29, 2016 · 6 comments
Closed

Provide a way to support custom modifier separator #69

qfox opened this issue Jan 29, 2016 · 6 comments
Assignees
Milestone

Comments

@qfox
Copy link
Member

qfox commented Jan 29, 2016

like block__elem_mod!!!val

For now it's impossible to do.

Purpose is using for Harry Roberts' notation: block__elem--mod_val.

@Yeti-or
Copy link
Member

Yeti-or commented Jan 29, 2016

I would love smth like this: block😈elem🚬mod👯val

@qfox
Copy link
Member Author

qfox commented Jan 29, 2016

How it should be pronounced? Just curious.

@Yeti-or
Copy link
Member

Yeti-or commented Jan 29, 2016

block elem modifier as always.
or sex, dugs & rock n' roll

@blond
Copy link
Member

blond commented Mar 20, 2016

I think we need to add modName and modVal option, and remove mod option.

import bemNaming from 'bem-naming';

const myNaming = bemNaming({ modName: '--', modVal: '_' })

@blond blond modified the milestone: 1.0 Mar 20, 2016
@blond
Copy link
Member

blond commented Mar 20, 2016

Maybe we should wrap delimiters to delimiters field?

import bemNaming from 'bem-naming';

const myNaming = bemNaming({
    delimiters: { elem: '__', modName: '--', modVal: '_' },
    wordPattern: '[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*'
});

@tadatuta
Copy link
Member

I'd suggest to make mod polymorphic and support objects with { name: '', value: '' } as well as strings.
So it will be backward compatible and intuitive.

And I disagree with additional nesting with delimiters — there's just few opts, what's the point in grouping?

@blond blond self-assigned this Mar 23, 2016
@blond blond closed this as completed in #76 Mar 24, 2016
@blond blond self-assigned this Mar 24, 2016
qfox pushed a commit that referenced this issue Jun 6, 2017
…0.7.0

Update eslint-config-pedant to version 0.7.0 🚀
qfox pushed a commit that referenced this issue Jun 6, 2017
@qfox qfox added the pkg:naming label Jul 2, 2017
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

4 participants