JSFiddle - React, Tailwind, and code Playground

by skram

HTML

<ol id="test" style="width:100px;">
    <li>test1</li>
    <li>test1</li>
    <li>toooooooooooooooooo loooooooooooooooooonnnnnnnnnnnnnnggggggg</li>
    <li>test1</li>
    <li>test1</li>
    <li>test1</li>
</ol>

CSS

#test li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; 
}

#test {
  list-style-position: inside;
}