Skip to content

Instantly share code, notes, and snippets.

@pascalduez pascalduez/
Last active Aug 29, 2015

What would you like to do?

SassDoc allows to document Sass items: functions, mixins, variables, placeholders.
No CSS selectors.
It uses a similar system as JSDoc, based on comments and annotations.

You can choose between two types of comments.

Inline comments (3 slashes):


CStyle comments [removed support from v2.0]:


Inline comments are preferred since they are not output to resulting CSS.

1. So the first step is actually to comment your Sass code.

/// A variable named foo.
/// @type String
$foo: 'foo';

/// A mixin that just do nothing.
/// @param {String} $arg - I'm an argument.
@mixin bar($arg) {}

Check the range of annotations available and their usage:

2. Decide how your going to use SassDoc

I. From the command line (CLI)


npm install -g sassdoc


sassdoc src dest

Where src is the folder containing your .scss files and dest the folder you want the generated documentation to be output in.

II. Or using one of the available tasks runners plugins:



Voilà !


This comment has been minimized.

Copy link

commented Jan 14, 2015

Thanks! I'll give this a try. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.