DEV Community

Travis Fantina
Travis Fantina

Posted on

CSS Index Generator?

I've sometimes seen lengthy stylesheets that include an index at the top something like:

1: Headings: line 255
2: Cards: line 380

...

255: /*----------Headings-------*/

...

380: /*---------Cards----------*/
Enter fullscreen mode Exit fullscreen mode

This makes it super easy to navigate big stylesheets. Is this done by hand? I imagine it's super tedious to go in and update the index even if your just making a few line changes or the project is in active development.

Is there any sort of gulp tool that would do this for you based on some formatting in the css?

Top comments (0)