My point was that sometimes the same element can be both block and inline,
depending on where you use it.
For example I would like my <li> to be inline everywhere - except the place
where I make them display:block. And having HAML a global option called
inline_elements=%w{...} might have problems with scoping.

I love the idea. But am trying to guess what problems people will have with
it, and the scope of such a definition might be one of the problems.

On 10/21/07, Tom Stuart <[EMAIL PROTECTED]> wrote:
>
>
> On 21 Oct 2007, at 10:23, Nathan Weizenbaum wrote:
> > The problem with Haml throwing any errors for invalid HTML is that it
> > creates the expectation that Haml will detect other errors. I don't
> > want
> > to build an HTML validator into Haml, nor do I want to have people
> > expect one to be there when it really isn't.
>
> Point taken. Of course HTML validity is a larger and hairier issue
> than just whether inline-level elements contain block-level ones (and
> even the DTD can't express all of the syntactic HTML validity
> constraints) so clearly this isn't an area you want to get into.
> However, if you're deciding to pay attention to a specific part of
> HTML's semantics (inline vs block) it's not an inherently bad idea to
> do so correctly, with the caveat that you're not making any claims
> about any other aspect of HTML.
>
> It seems like this is the stance that Haml is already taking with tag
> generation, attribute quoting etc (i.e. you've made it impossible to
> generate badly-nested or unclosed tags, or attributes with unescaped
> quotes), so this would just be another incremental chipping-away at
> the problem; Haml already looks after your tag nesting and attribute
> quoting, and now it knows about inline/block tags too, so it won't
> let you do fundamentally broken things with them either.
>
> Cheers,
> -Tom
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to