On Oct 21, 2007, at 4:08 AM, Tom Stuart wrote:
>
> On 21 Oct 2007, at 11:44, Evgeny wrote:
>> 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.
>
> True enough -- some elements (div, object, ins, del, dd, li,
> fieldset, button, th, td) can contain both inline- and block-level
> content, so this is an interesting problem. Again I guess the most
> magical solution is to render them inline-style if they don't contain
> any block-level elements, and block-style if they do, but I don't
> know how much effort it'd be to get the Haml parser to support that!
>
> Cheers,
> -Tom
Why not take a different tack and shift the burden to the user:
%li this is a list item
%li
so is this
%li) this is an inline list item
%li)
so is this
%li{:style => "display:inline;"})
this list item display inline
Maybe the right paren is a poor choice, but if the user can
explicitly suppress the newline/indent, the all is hunky-dory, right?
And nobody has to worry about what's valid HTML except the
standardistas :)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---