Why can't the Unit be calculated in CSS using something like:

    nav > ul {
      counter-reset: unit;

      > li {
        counter-increment: unit;

        &::before { content: 'Unit ' counter(unit) '.'; }
      }
    }