I like the idea to shortcur the data attributes, but I think "d-" syntax is a little bit confusing it would be great to have something more explicit. Maybe involve a special character, or something.
On Wed, Dec 19, 2012 at 12:14 PM, Priit <[email protected]> wrote: > 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. > -- Regards, Artem Komarov -- You received this message because you are subscribed to the Google Groups "Haml" group. 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.
