Stepped lists always show zero count for nested ordered lists
carkod opened this issue · comments
Describe the bug
When we add an ordered list nested inside of the p-stepped-list__content
the numbers always start from 0.x, no matter what step we are in. Interestingly, this only happens when we use p-stepped-list---detailed
or when use p-list--divided
To Reproduce
Steps to reproduce the behavior:
- Go to https://codepen.io/carkod/pen/mdovJWr
- Scroll to step 4. You can see that the nested ordered list starts from 0.1, instead it should show 4.1
Expected behavior
If you change the top parent class from p-stepped-list--detailed
to p-stepped-list
, or the nested list from p-list--divided
to p-list
it actually works! That's why this is filed as a bug
Thanks. Seems like there is some counter reset happening somewhere. I wonder if it was intended for a reason.
It seems that the CSS counter inside the p-list--divided conflicts with some CSS reset that we do in stepped list (needs a bit more investigation).
See: https://github.com/search?q=repo%3Acanonical%2Fvanilla-framework%20counter-reset&type=code
Fixed in #5011