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

Add bem-compatible html code generator #13

Open
installero opened this issue Jul 30, 2014 · 3 comments
Open

Add bem-compatible html code generator #13

installero opened this issue Jul 30, 2014 · 3 comments
Labels
Milestone

Comments

@installero
Copy link

It would be awesome to avoid retyping bem-prefix every time while writing code in haml/rhtml template. I wonder one can add a preprocessor or something to convert

<%= block name: 'user' do %>
  <div>
    <p class="_name">
      <%= user.name %>
    </p>
    <p class="_age">
      <%= user.age %>
    </p>
  </div>
<% end %>

into

<div class=”b-user”>
  <p class="b-user_name">
     <%= user.name %>
  </p>
  <p class="b-user_age">
    <%= user.age %>
  </p>
</div>
@installero
Copy link
Author

@awinogradov
Copy link
Owner

Awesome!

@installero
Copy link
Author

I am not insisting on that very syntax for block generator, btw. It's just rough example.

@awinogradov awinogradov modified the milestone: 1.1.0 Dec 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants