- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Fri, 23 Feb 2007 10:37:19 -0800
- To: "Daniel Beardsmore" <public@telcontar.net>, <www-style@w3.org>
----- Original Message ----- From: "Daniel Beardsmore" <public@telcontar.net> To: <www-style@w3.org> Sent: Thursday, February 22, 2007 8:15 PM Subject: Wrapping delimited lists, fluid rows | | I won't dump my entire backlog of ideas here in one go, but here's something | that's troubled me without solution: imagine a list with a visual delimeter set | to display horizontally: | | ul.menu li { display: inline } | ul.menu li:after { content: " | " } | ul.menu li:last-child:after { content: none } | | A given list might look like: | | Foo | Bar | Baz | | But if this list wraps onto a new line, you'll see a problem: | | Foo | Bar | Baz | Iddly | Diddly | We've | Run | Out | | of | Names | For | This | List | | The last item on the first row doesn't get its delimited removed. | | I was thinking, can't we have a way to select :last-on-line and :first-on-line? | | So then we can stipulate: | | ul.menu li:last-on-line:after { content: none } | .... Rules like ul.menu li:after { content: " | " } ul.menu li:last-on-line:after { content: none } effectively create oscillation condition in the layout algorithm. Think about the case whem space left on the line is less than width of " | ". In this case last item needs to be wrapped on the next line. So you will have a situation when "ul.menu:not(:last-on-line) li" and ul.menu "li:last-on-line" matches the same element in single layout transaction. Highly undesirable behavior. Main principle of stable system of selectors and layouts: It shall not be any selector A that when it is applied to the DOM produces layout that is making selector :not(A) true for the same DOM element. Andrew Fedoniouk. http://terrainformatica.com
Received on Friday, 23 February 2007 20:51:55 UTC