JSFiddle - React, Tailwind, and code Playground

by BurpmanJunior

CSS

ul{
    counter-reset: fizzbuzz;
}
li{
    counter-increment: fizzbuzz;
}
li:before{
    content: counter(fizzbuzz);
}
li:nth-child(3n):before{
    content: 'fizz';
}
li:nth-child(5n):before{
    content: 'buzz';
}
li:nth-child(15n):before{
    content: 'fizzbuzz';
}

JavaScript

/**
 * PURE CSS FIZZ BUZZ
 */

/* Build list HTML only */
var limit = 300,
    list = document.createElement('ul');
for (var i = 0; i < limit; i++) {
    var item = document.createElement('li');
    list.appendChild(item);
}
document.body.appendChild(list);