<br><br><div class="gmail_quote">On Tue, Mar 25, 2008 at 2:44 PM, Keryx Web <<a href="mailto:webmaster@keryx.se">webmaster@keryx.se</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Some of you might have seen this, but accpording to the original author<br>
there was no response. His suggestions make sense to me. I've been there<br>
as well.<br>
<br>
Lars Gunther<br>
<br>
This is from Thomas Thomassen on WSG's list:<br>
<br>
------------<br>
I was working on some examples for the use of <del> and <ins>.<br>
<a href="http://www.thomthom.net/blog/2008/03/document-history-viewer-making-use-of-del-and-ins/" target="_blank">http://www.thomthom.net/blog/2008/03/document-history-viewer-making-use-of-del-and-ins/</a><br>
<br>
As I was working on this I wanted to mark up a list where items had been<br>
added and removed. That's when I realised that you can't wrap up <li><br>
<dt> or <dd> in <del> or <ins> elements because <ul>, <ol> and <dl> only<br>
allows list items as their direct child.<br>
<br>
The <del> and <ins> then have to be wrapped inside the list item.<br>
<br>
<ul><br>
   <li>Item 1</li><br>
   <li><del>Item 2</del></li><br>
   <li>Item 3</li><br>
</ul><br>
<br>
When I hid the <del> using display: hidden; the list would render<br>
something like this:<br>
<br>
* Item 1<br>
*<br>
* Item 3<br>
<br>
Because I could wrap up the entire list item, the bullet point would<br>
still remain.<br>
<br>
To me it appears illogical to not wrap the <del> or <ins> around the<br>
list items when you add and remove items to the list. I'm guessing it's<br>
a case where every scenario wasn't accounted for when the specifications<br>
was written. (Yes, I know that I could add an extra class to the list<br>
item that I wanted to hide, but it's not the point. It shouldn't be<br>
necessary.)<br>
<br>
However, when this scenario presents itself I see it as fine to break<br>
the specification and mark it up like this:<br>
<ul><br>
   <li>Item 1</li><br>
   <del><li>Item 2</li></del><br>
   <li>Item 3</li><br>
</ul><br>
<br>
This seem to render exactly as I expect it to do in every browser I've<br>
tested.<br>
<br>
* Item 1<br>
* Item 3<br>
<br>
<br>
<br>
</blockquote></div>I'm coming around to the opinion that <dl>, <ul>, and <ol> (and the new list elements in html5) should allow a larger set of elements as their direct children.  I've been playing around with <hn> within <ul> or <ol> (with the intended semantics being that it's a header *for the list*), as it provides a nice tight binding that makes it easier to style and move around with CSS.  I could also use <section> or <div>, of course, but my solution communicates exactly the semantics I want and nothing else.<br>
<br>Being able to wrap <li> (and the equivalents of <dt> and <dd>, etc) in <ins> or <del> seems appropriate and useful, at least to authors that actually use <ins> and <del>.  Note, though, that there is a slight uncertainty about how <ol> should number in this case.  Luckily, the browsers I'm testing this in (FF2, Opera9, and IE7) seem to treat things in the most reasonable default way.  With default rendering, the <del>'d part is treated as a proper part of the list and affects numbering.  If you clean up the document by setting {display:none} on <del> and {text-decoration: none} on <ins>, though, the list renumbers so that the <del>'d list items are ignored in the numbering.<br>
<br>Since we have complete consistency between the major browsers (I just haven't tested in Safari), it shouldn't be an issue to have this in the spec.  At the very least, this would be appropriate for quirks mode, but I see nothing wrong (and quite a bit right) with making it part of the spec proper.<br>
<br>If we *did* do so, we need to figure out what other elements should be allowed within a list.<br><br>~TJ<br>