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.
/// 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: http://sassdoc.com/annotations
Install:
npm install -g sassdoc
Run:
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.
Grunt: http://sassdoc.com/grunt
Gulp: http://sassdoc.com/gulp
Voilà !
Thanks! I'll give this a try. :)