GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - 2createStudio/postcss-toc: Generate table of contents for your stylesheets

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
index.js
index.js
 
 
package.json
package.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

postcss-toc

Usage

var fs = require('fs');
var path = require('path');
var postcss = require('postcss');
var toc = require('postcss-toc');

var css = fs.readFileSync('./css/style.css', 'utf8');

postcss([toc(opts)])
	.process(css, {
		from: './css/style.css',
		to: './dist/style.css'
	})
	.then(function(result) {
		fs.writeFileSync('./dist/style.css', result.css);
	});

Result

/* Input */

/* ------------------------------------------------------------ *\
	Button
\* ------------------------------------------------------------ */

.btn { display: inline-block; vertical-align: middle; text-align: center; cursor: pointer; border-radius: 0; color: #999; font-size: 16px; font-weight: 500; padding: 9px 10px 5px; }

.btn:hover { transform: scale(.95); color: #999; }

/*  Button Border  */
.btn--border { border: 1px solid #ccc; }

/*  Button Medium  */
.btn--medium { min-width: 170px; }

/*  Button Block  */
.btn-block { display: block; padding-left: 0; padding-right: 0; }

/* ------------------------------------------------------------ *\
	Slider
\* ------------------------------------------------------------ */

.slider .slides { list-style: none outside none; }

/* ---------------- */

/* Output */

/*
Table of Contents

1. Button ------------------------------------
    Button Border ----------------------------
    Button Medium ----------------------------
    Button Block -----------------------------
2. Slider ------------------------------------

 */

/* ------------------------------------------------------------ *\
	Button
\* ------------------------------------------------------------ */

.btn { display: inline-block; vertical-align: middle; text-align: center; cursor: pointer; border-radius: 0; color: #999; font-size: 16px; font-weight: 500; padding: 9px 10px 5px; }

.btn:hover { transform: scale(.95); color: #999; }

/*  Button Border  */
.btn--border { border: 1px solid #ccc; }

/*  Button Medium  */
.btn--medium { min-width: 170px; }

/*  Button Block  */
.btn-block { display: block; padding-left: 0; padding-right: 0; }

/* ------------------------------------------------------------ *\
	Slider
\* ------------------------------------------------------------ */

.slider .slides { list-style: none outside none; }

About

Generate table of contents for your stylesheets

Resources

Readme
MIT license
Activity
Custom properties

Stars

1 star

Watchers

7 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.