PostCSS plugin automatically create a table of contents from certain comments inside CSS file.
Write the numbering placeholder #) in your comments.
/* #) Navigation */
some rules...
/* ##) Links */
some rules...
/* ##) Menus */
some rules...
/* #) Accessibility */
some rules...
This plugin will replace the placeholder with increment number.
/* 1) Navigation */
some rules...
/* 1.1) Links */
some rules...
/* 1.2) Menus */
some rules...
/* 2) Accessibility */
some rules...
- Automated numbering
- Supports indexing up to three levels
- Write your heading in regular css comment syntax.
- Write your heading in one single line.
- The numbering placeholder #) must come first in your heading.
Use with postcss-cli.
postcss --use postcss-table-of-contents
See PostCSS docs for examples for your environment.
In the next version it will make an table of content in the css head - like this:
/*------------------------------------------------------------------------------
TABLE OF CONTENTS:
1) Normalize
2) Typography
3) Elements
------------------------------------------------------------------------------*/
/* 1) Normalize */
some rules...
/* 2) Typography */
some rules...
/* 3) Elements */
some rules...