Could somebody create a quick CSS snippet to alternate colors between rows that I could use?

Could somebody create a quick CSS snippet to alternate colors between rows that I could use?

Thanks in advance!

Comments

  1. Thanks! This works well, apart from the problem you mentioned in the post. Is it possible to get to true alternating colors for the rows, by making odd li elements at odd depth have color A for 2n and color B for 2n+1, and have li elements at even depth have color B for 2n and color A for 2n+1?

    ReplyDelete
  2. I guess a general solution is beyond CSS and would need to be informed by the program. Color of following tasks in the outer structure would need to change when you add/delete subtasks or expand/collapse subtasks. Maybe someone with deep insight in the CheckVist structure can come up with a clever solution. Alternatively, one could choose two different sets of colors and alternate them depending on the level of nesting. This would need rules for every level of nesting.

    ReplyDelete
  3. How do I target a particular level of nesting? I could just write the rules till level 10, as that is probably the max I would go.

    ReplyDelete
  4. Nvm, that won't work either. Looks like this cannot be done with JS.

    ReplyDelete
  5. Hello, you're right, it is hardly possible with CSS only. May I ask you - what are you trying to achieve with color altering? If you need a better separation of list items, bullets mode would suffice?

    You can enable it via 'oo' -> List style.
    Best,

    ReplyDelete
  6. Just trying to make the list more readable by alternating colors (similar to how it is done for tables to improve readability).

    Thanks for pointing out bullets mode. It helps, but alternating colors would be better.

    ReplyDelete

Post a Comment

Popular posts from this blog

Hello friends

Hello friends!

I'm really enjoy using checkvist, you are adding great features very quickly.