Celebrating 7 Years! Get up to $30 off GeneratePress Premium!

[Support request] Why is ol list-style set to decimal?

Home Forums Support [Support request] Why is ol list-style set to decimal?

Home Forums Support Why is ol list-style set to decimal?

  • This topic has 3 replies, 2 voices, and was last updated 3 years ago by Tom.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #558175
    wekhter

    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”)

    GeneratePress 2.0.2
    GP Premium 1.6.2
    #558561
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    That’s a good question. The code came with underscores, which was the framework behind GP: https://github.com/Automattic/_s/blob/master/style.css#L492

    What if you did this?:

    ol[type=A],
    ol[type=a] {
        list-style:upper-alpha;
    }
    #558984
    wekhter

    @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!

    #559259
    Tom
    Lead Developer
    Lead Developer

    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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.