Haml certainly values the look and feel of the HTML output. That's why we go
to such pains to properly indent everything and produce valid code. But it
also cares about conventions, and the convention for writing HTML5, like
other versions of HTML, is clearly not to include the closing slash. This is
a minor enough formatting preference that I don't think it's worth adding a
configuration option specifically for it, especially when currently the
:xhtml format option does exactly this.

2009/11/23 Eric Meyer <[email protected]>

> I'm not actually used to XHTML - didn't like the way it was served so
> I used HTML - just always liked those closing slashes. Always thought
> the stricter, more formal rules of coding made more sense. But I'm
> happy for people to have different taste on that. Main point was just
> that I think we should care how our output code looks.
>
> I love these tools, but I think it's important to remember that
> whatever tools (frameworks/meta-languages) we use to write, we're
> writing HTML and CSS. Those are what matter once we're done, and what
> we leave the client with. I want to write my own code, otherwise I
> might as well just be slicing it up in GoLive. I like SASS because I
> get the speed of a framework, but I know every line of the output when
> I write it. Awesome.
>
> Cheers,
> -e
>
>
>
> On Nov 23, 6:41 pm, Norman Clarke <[email protected]> wrote:
> > On Mon, Nov 23, 2009 at 10:00 PM, Eric Meyer <[email protected]> wrote:
> > > Self-closing tags aren't "required" in HTML5, but I always thought
> > > they made more sense. I keep them in all my HTML5 code (most of what I
> > > do these days), and it isn't because I have to validate as XML - it is
> > > because it makes the document more readable.
> >
> > That's because you're used to doing XHTML. Which is fine. But seriously,
> >
> > <meta content="en-us" http-equiv="Content-Language" />
> >
> > is barely visually different from:
> >
> > <meta content="en-us" http-equiv="Content-Language">
> >
> > and the number of tags which self-close in XHTML is so small that if
> > you know what they mean, you can keep them in your head. If you know
> > HTML well, this code should look ridiculous to you:
> >
> > <br>content here</br>
> >
> > So why do you need the trailing slash to tell you not to expect nested
> > content after a <br>? You don't - it was never included for
> > readability, it was included for compatibility with XML. I would go so
> > far as to say it was included *despite* the fact that it made
> > documents uglier and less readable. But I started working with HTML
> > 3.0 so I guess that's my bias. :)
> >
> > In any event, this is a solved problem in the latest Haml, if you want
> > HTML5 self-closing tags just use Haml's default settings and "!!! 5"
> > for your doctype.
> >
> > --Norman
>
> --
>
> 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] <haml%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/haml?hl=en.
>
>
>

--

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