wet-boew / wet-boew-styleguide

A style guide for the Web Experience Toolkit.
http://wet-boew.github.io/wet-boew-styleguide/index-en.html
35 stars 32 forks source link

Lists: Ordered list split? #387

Open Bgolden67 opened 4 years ago

Bgolden67 commented 4 years ago

Has anyone played with the ol.split CSS method for splitting ordered lists instead of using ol start=

As much as I've tried to have my content people steer clear of using a list that continues after new headers, it's still happening and we are being forces to either code an unordered list and manually type the number or use the start= Even if start= is allowed now, it still doesn't make sense to have a list in a new section start at anything other than 1 or A

However, while we are forced to code these lists, is a CSS option worthy? is it accessible?

I found this example: https://dev.opera.com/articles/automatic-numbering-with-css-counters/start.html

ghost commented 4 years ago

I find that particular example kind confusing (like it feels out of order).

This seems to be a better use https://css-tricks.com/almanac/properties/c/counter-reset/. I would also check out https://developer.mozilla.org/en-US/docs/Web/CSS/counter-reset.

In these example it using these classes to create automatic numbers for chapters (neither uses the list html (<ul>/<ol>)).

Bgolden67 commented 4 years ago

I don't think that does the same thing i was referring to. I'm wondering if anyone has experimented with an alternative to ol start= I don't think a counter reset is the same thing

ghost commented 4 years ago

Ah, the example you provided was for counter reset.

ol:nth-of-type(2) {
counter-reset: list-order 3;
}