Maybe it's splitting hairs, but commonality implies a statistical analysis to save developers time in the most frequent use cases while the "most generic legal element" can be calculated and documented according to the semantics of the elements themselves. for instance, I bet we'd find that an anchor tag is the most commonly used sub element in a paragraph but the most generic legal element would be a span.
-chris 2008/10/20 PEZ <[EMAIL PROTECTED]> > > What's the difference between "the most common HTML element allowed in > this context" and "the most generic legal element in this context" > that you feel makes the latter preferable? > > /PEZ > > On Oct 20, 6:14 pm, "Chris Eppstein" <[EMAIL PROTECTED]> wrote: > > I look at this slightly differently. When I read the syntax of ".foo" I > see > > an element with the class of foo. If I use an implicit tag within an LI, > I > > will generate invalid HTML. Whereas, if the dot syntax were smarter, > you'd > > get valid HTML. I don't think the rationale for changing the behavior of > > implicit elements ought to be "the most common element in this context" > but > > rather "the most generic legal element in this context". > > Granted, this is less explicit, but I think the only other valid behavior > > here is to raise an error. Haml should not be generating invalid > documents > > where it can be avoided. If you really want an illegal document you > should > > specify the tag explicitly. > > > > chris > > > > 2008/10/20 John Schult <[EMAIL PROTECTED]> > > > > > > > > > On Oct 19, 6:26 am, "Mislav Marohnić" <[EMAIL PROTECTED]> > > > wrote: > > > > Here is what the syntax would be (feedback please): > > > > > > %table -- <table> > > > > %.odd -- <tr class="odd"> > > > > % foo -- <td>foo</td> > > > > % bar -- <td>bar</td> > > > > %.even > > > > ... > > > > > > So, the "%" character without tag name would mean "the most common > HTML > > > > element allowed in this context". > > > > > My vote would be a no. I think more syntactic sugar makes Haml less > > > obvious. Hampton's suggestion of using the dot only would be even > > > worse. Let's not try and get too clever here, please :) > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
