Closed BenjaminRCooper closed 10 years ago
Implemented.
Ok, we need to change this as it is now incorrect.
I propose we change it so we follow the format implemented via sassdown, with the option of using this in our build process once it becomes more stable.
Thoughts?
Also will add a standard for adding section headers, like so;
// =============================
// Global Variables
// =============================
Ben
On hold
Updated documentation to reference KSS documentation
Reopened to discuss the change in commenting.
This needs rethinking as Styledocco is not the best approach, new tools have came out and I potentially think we don't need to generate documentation from our comments.
I write more comments than code, so I am all for having a defined commenting style, as theres nothing worse than comments in different styles.
There are tools such as; SassDoc, KSS etc, but I'm not sure we need that amount of functionality and the additional overhead in the build and automation process.
What sort of things should we comment?
Here's a list which I use comments for;
// =============================
// Core Flag Pattern Styling
// =============================
Note -
// Flag Sidebar Flag Body
//
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
//
Example Use:
. Example of this;// Example Use:
//
// @include rem-sizing("font-size", 32px);
//
// Parameter Description:
//
// $property - A string value which contains the property which you want to set a REM unit value for. // "font-size"
// $value - The value (in pixels) of the elements property you are setting the REM value for. // 12px
// $context - This value is mapped back to the $font-size-base variable set within the _settings.scss partial.
Thoughts?
Ben
Comments haven't rendered correctly.
Provided a screenshot
I've got no problem with the comment styles suggested above. I'd say mine are similar apart from the use of diagrams which is not something i do.
+1
Yeah, I think using the two different styles of comments is a good idea, one for labeling sections and then just simple comments for everything else will make it easy when scanning a document to see whats going on.
+1
Will implement and close off once done.
Implemented and closed.
Writing comments in this format will allow the Grunt task to produce a component library, which would be a great reference to new maintainers of your codebase.
Even if you feel the style guide is not necessary for the project you are working on, implementing your comments in this way will allow other maintainers of the projects codebase a context in which the module would be used.
Resources:
Style Docco Website (http://jacobrask.github.io/styledocco/)