Use CSS pseudo-selectors for odd/even instead of calculating an index

This commit is contained in:
Daniel Compton 2017-10-19 16:14:19 +13:00
parent 4d13391c37
commit 586de69894
3 changed files with 3 additions and 8 deletions

View File

@ -192,8 +192,7 @@
#--re-frame-trace-- tr th:first-child {
text-align: right;
}
#--re-frame-trace-- tr.trace--trace-even,
#--re-frame-trace-- tr.trace--trace-even + .trace--details {
#--re-frame-trace-- tr:nth-child(even) {
background: #fafafa;
}
#--re-frame-trace-- tr.trace--sub-create .trace--op {

View File

@ -258,8 +258,7 @@
&.trace--trace {
}
&.trace--trace-even,
&.trace--trace-even + .trace--details {
&:nth-child(even) {
background: @background-gray-hint;
}

View File

@ -183,10 +183,7 @@
:event "trace--event"
:render "trace--render"
:re-frame.router/fsm-trigger "trace--fsm-trigger"
nil)
(if (even? index)
"trace--trace-even"
"trace--trace-odd")])}
nil)])}
[:td.trace--toggle
[:button (if show-row? "▼" "▶")]]