DEV Community

Travis Fantina
Travis Fantina

Posted on

2 2

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)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more