This repository was archived by the owner on Aug 8, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -371,3 +371,49 @@ breadcrumb link styles. That could be enough to warrant a heading:
371371.c-breadcrumbs__link.c--current {
372372}
373373```
374+
375+
376+ Functions & Mixins
377+ ------------------
378+
379+ ` @function ` and ` @mixin ` code have the same rules as most everything mentioned
380+ above, as well as some unique requirements as well.
381+
382+
383+ ### Doc Block
384+
385+ In addition to the standard definition documentation, there is what we call a
386+ doc block section that documents all the parameters: what data type is expected,
387+ and what purpose they serve.
388+
389+ Lastly, the doc block records the return value; mainly just what the data
390+ type is.
391+
392+ Parameters and return values are defined in the following format:
393+
394+ ` @param ` identifies the parameters.
395+
396+ ` @return ` identifies the return value.
397+
398+
399+ ### Dependencies
400+
401+ The dependencies section lists any functions, mixins or variables that is
402+ required. If any of these are missing, then your code will likely not work.
403+
404+ An example of both the doc block and dependencies can be seen here:
405+
406+ ```
407+ // My Function
408+ // ===========
409+ //
410+ // Standard definition section goes here.
411+ //
412+ // @param $value [integer] : This is the initial integer that will be modified
413+ // @param $modifier [integer] : This is the modifying value, added to $value
414+ // @return [integer]
415+
416+ @function add($value, $modifier) {
417+ @return $value + $modifier;
418+ }
419+ ```
You can’t perform that action at this time.
0 commit comments