A solution to control the space between numeral and text with respect to widest marking.
Tip: edit the last 'text-align' to get 'inside''inside or 'outside''outside effect. You can remove 'upper-roman' for standard numeral.
ol {
counter-reset: n;
display: table-row;
text-align: left;
}
li {
counter-increment: n;
display: table-row;
text-align: left;
}
li::before {
content: counter(n, upper-roman) ".";
display: table-cell;
padding-right: 1rem;
text-align: left;
}
<ol>
<li>test1</li>
<li>test2</li>
<li>test3</li>
</ol>