CSS Rooster

Go to Source

A Bot that Writes CSS Classes for HTML with Deep Learning

I played with it for a bit to see if I could get it to do anything impressively analytic. I took some semantic HTML and removed all the class names from it with the RegEx class="[a-zA-Z0-9:;\.\s\(\)\-\,]*". I dropped the class-free HTML into the Rooster, and it did generate new classes:

But the new classes seemed entirely based on what the tag is. <ul class="list">, <a class="link"> and such. That was without feeding it any CSS at all though. After I dropped in my whole stylesheet in a style block, I think I confused it. I got some new weird classes that weren’t in my styles and stuff like <br class="desc" />. Oh well, it’s just a fun experiment I think. Naming is hard, but we should probably still be doing it for ourselves.

Direct Link to ArticlePermalink

CSS Rooster is a post from CSS-Tricks

Go to Source