Home > Enterprise >  Style nested list elements children, grandchildren and more
Style nested list elements children, grandchildren and more

Time:11-26

I need a loop for lists elements to style their bullets. children - green grandchildren - blue grand grandchildren - gray grand grand grandchildren - green grand grand grand grandchildren - blue grand grand grand grand grandchildren - gray

I created a CodePen to explain what I mean. enter image description here

CodePudding user response:

The problem is that we are looping only the colours. So if I have 3 colours in $bullet-colors, the 4th, 5th, 6th ... nested elements will have the same colour as the 3rd one. enter image description here

  • Related