Skip to content

Conversation

@camppacifictech
Copy link

@camppacifictech camppacifictech commented Nov 4, 2020

I needed this for a project with non-BEM classes and thought it would be handy to use the Bike plugin with options to specify the template of the selectors for block/element/modifiers, using template strings/string literals.

Not sure of any security implications of using lodash.template which I think runs eval() on the template?

The templates can be specified in the options as:

{ blockFormat: '.${block}', elementFormat: '.${block}__${elem}', modifierFormat: '${base}_${key}_${value}', modifierFormatTrue: '${base}_${key}' }

Since this project is BEM-focused then this functionality might not really be needed or suitable but thought I'd leave this here for any interested people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant