Simplify the log tree implementation a bit

In particular use the :last-child selector, which is non-standard but
supported by all major browsers.
This commit is contained in:
Eelco Dolstra
2013-02-19 17:14:02 +01:00
parent 8c37f46955
commit 4266632eb0
3 changed files with 45 additions and 54 deletions

View File

@ -3,37 +3,34 @@
padding: 0.3em;
}
ul.nesting, ul.toplevel {
ul.tree, ul.subtree {
padding: 0;
margin: 0;
}
ul.toplevel {
list-style-type: none;
}
.line, .head {
padding-top: 0em;
}
ul.nesting li.line, ul.nesting li.lastline {
/* Indent each tree level. */
li.tree-line {
position: relative;
list-style-type: none;
}
ul.nesting li.line {
padding-left: 2.0em;
}
ul.nesting li.lastline {
padding-left: 2.1em; /* for the 0.1em border-left in .lastline > .lineconn */
li.tree-line:last-child {
padding-left: 2.1em; /* for the 0.1em border-left in the last child */
}
li.line {
/* Draw vertical tree lines next to all children except the last. */
li.tree-line {
border-left: 0.1em solid #6185a0;
}
li.line > span.lineconn, li.lastline > span.lineconn {
li.tree-line:last-child {
border-left: 0;
}
/* Draw horizontal tree lines to all children. */
span.tree-conn {
position: absolute;
height: 0.65em;
left: 0em;
@ -41,14 +38,21 @@ li.line > span.lineconn, li.lastline > span.lineconn {
border-bottom: 0.1em solid #6185a0;
}
li.lastline > span.lineconn {
/* Draw the vertical tree line to the last child. */
li.tree-line:last-child > span.tree-conn {
border-left: 0.1em solid #6185a0;
}
.tree-toggle {
text-decoration: none;
font-family: monospace;
font-size: larger;
}
em.storeref {
color: #500000;
position: relative;
position: relative;
width: 100%;
}
@ -75,12 +79,6 @@ em.storeref:hover span.popup {
}
.logTreeToggle {
text-decoration: none;
font-family: monospace;
font-size: larger;
}
span.code {
white-space: pre-wrap;
font-family: monospace;