Skip to content

halftonecloud/styledocco

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StyleDocco

StyleDocco generates style guide documents from your stylesheets by parsing your stylesheet comments through Markdown.

You can write HTML snippets in your stylesheet comments, prefixed with 4 spaces or between code fences (```), and StyleDocco will show a preview with the styles applied, as well as display the example HTML code. The previews are rendered in a resizable iframes to make it easy to demonstrate responsive designs at different viewport sizes.

Suggestions, feature requests and bug reports are welcome either at GitHub or on Twitter (@jacobrask).

Installation

StyleDocco is free and open source software, released under the MIT license.

Usage

Syntax

/** Provides extra visual weight and identifies the primary action in a set of buttons.

    <button class="btn primary">Primary</button> */
.btn.primary {
    background: blue;
    color: white;
}

Would display the description, a rendered button as well as the example HTML code. The CSS will be applied to the preview.

See the examples folder for more in-depth examples.

Tips and tricks

  • Add :hover, :focus, etc as class names in example code and the pseudo class styles will be applied in the preview.

Acknowledgements

A lot of the heavy lifting in StyleDocco is done by the excellent Marked module by Christopher Jeffrey. The original Docco by Jeremy Ashkenas and Knyle Style Sheets have also been sources of inspiration for StyleDocco.

About

Automatically generate a style guide from your stylesheets.

Resources

License

Stars

Watchers

Forks

Packages

No packages published