3 ms·
Wrote a stylus function that automatically applies the right properties to achieve this effect: fake-truncate(num) fill(num) buf = ''
by woah 13y ago
Wrote a stylus function that automatically applies the right properties to achieve this effect:
fake-truncate(num)
fill(num)
buf = ''
for index in 1..num
buf += '_ '
position: relative
overflow: hidden
&:before
content: fill(num)
visibility: hidden
display: block
._content
position: absolute
top: 0
bottom: 0
left: 0
right: 0