Re: "Allow rendering of <input checked>-style attributes in HTML mode."
http://github.com/nex3/haml/commit/ae3c44f574f6ef842850ede446e48e4f7bac0191

  %input{:selected => false}

will render as:

  <input selected="false">

The docs say that this is not equivalent to not rendering an attribute. But,
in fact, it is:
http://www.w3.org/TR/REC-html40/intro/sgmltut.html#didx-boolean_attribute

Some attributes play the role of boolean variables (e.g., the selected
> attribute for the OPTION element). Their appearance in the start tag of an
> element implies that the value of the attribute is "true". Their absence
> implies a value of "false".
>

This is HTML4. It has not changed in XHTML, except that the minimized form
is not allowed anymore.

Because <input selected="false"> and <input> are equivalent, I propose that
%input{:selected => false} does not render the attribute at all. We save
space on complex forms and the semantics are unchanged anyway.

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