• Generated text before list marker

    From Andrew Poulos@21:1/5 to All on Mon Nov 2 17:50:40 2020
    I have a list with
    list-style-type: lower-roman;

    and I have

    li:not([data-cluster="on"])::before {
    counter-increment: num;
    content: counter(num);
    }

    For example, the list appears as

    i.
    ii.1
    iii.2
    iv.
    v.

    Is there a way to reverse the order? So I'd get:

    i.
    1 ii.
    2 iii.
    iv.

    That is, to put the generated content before the list marker?

    Andrew Poulos

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrew Poulos@21:1/5 to Andrew Poulos on Mon Nov 2 19:53:44 2020
    On 2/11/2020 5:50 pm, Andrew Poulos wrote:
    I have a list with
     list-style-type: lower-roman;

    and I have

    li:not([data-cluster="on"])::before {
      counter-increment: num;
      content: counter(num);
    }

    For example, the list appears as

    i.
    ii.1
    iii.2
    iv.
    v.

    Is there a way to reverse the order? So I'd get:

    i.
    1 ii.
    2 iii.
    iv.

    That is, to put the generated content before the list marker?

    To answer my own question (again):

    <https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Lists_and_Counters/Using_CSS_counters>

    and the "Example of a nested counter" provided the information I needed
    as I didn't know that the CSS function "counter" could take a second
    parameter for style.

    Andrew Poulos

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)