Site logo

Archived topic

Why is ol list-style set to decimal?

3 replies · Started by wekhter on April 23, 2018

Viewing posts 1–4 of 4

In the style.css for GeneratePress, lines 70-72:

ol, ul {
	list-style: none;
}

and then later, lines 129-131:

ol {
	list-style: decimal;
}

Why is this done? I ask because it makes it so that defining something like <ol type="A"> has no actual effect (since the CSS sets it to decimal even after I've defined the type).

I can add in custom CSS to define:

ol[type=A]{list-style:upper-alpha;}

but that still leaves me out in the cold when it comes having a list use type="a" instead of type="A" because targeting the attribute with CSS isn't case sensitive.

I realize that I can manually define list-style:upper-alpha on the <ol>, but I'm just not sure why this should be set in a way that makes it override setting the list type, especially since setting the type is what lets screen readers know what to read out before each list item, right? (important on pages where list items are referred to by position, as in "See point B for details")

@Tom

"type=A" and "type=a" are actually two different things, the type is case sensitive. "A" is upper-alpha and "a" is lower-alpha. (https://codepen.io/wekhter/pen/QrNqVJ)

I'll see about bringing it up as an issue on _s!

I would be interested in seeing what they say - I'm hesitant to remove it from GP right away, just in case there's something I'm missing.

This archived topic is closed to new replies.