Open installero opened 10 years ago
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>
Discussion: http://habrahabr.ru/post/192972/#comment_7822421
Awesome!
I am not insisting on that very syntax for block generator, btw. It's just rough example.
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
into