Hi!

I'm using haml since 2007 and love it, great work!

Currently we are doing html5 jqurey mobile development and would like to 
simplify data syntax for haml.

Current syntax:
%div{:data => {:role => 'header', :theme => 'b'}}

I suggest:
.d-role-header.d-theme-b

Where 'd-' will indicate it's actually data attribute, second part will  be 
the hash key (example: role, theme etc) and last parts will be values 
(examlpe: header, b etc).

I made quick demo implementation: 
https://github.com/priit/haml/commit/9551419dba759c587380ec221504ae2745baf57f 


We are using it with two projects and my coworkers love it so far. 

I would love to go further, should haml community accept this custom data 
behavior into haml language (that would be great!) or should I go with 
separate extension as gem direction instead?

What do you think about it?

Thanks for any feedback!

Cheers,
Priit

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/haml/-/jJNDJChdqDsJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to