Skip to content

Documenting Mixins with Maps #111

Description

@gisu

Hi i sitting for my own Framework that need to documented. What is the best Way to document Mixins with Maps - like this:

/**
 * Generate the Offset Width for a Colum
 *
 * @param  {map}  $offset - Setup Vars
 *                         :size [number]
 *                           => The required colum size
 *                         :max [number]
 *                           => Max Colums
 *                         :direction [value]
 *                           => The Direction off the Offset (default: left)
 */
@mixin grid-offset($offset) {

  // Setup Default Vars
  $offset: map-merge((
    size: 1,
    max: 12,
    direction: left
  ),$offset);

  // Cleanup Max
  $m: strip-units(map-get($offset,max));
  // Cleanup Colums
  $c: clamp(strip-units(map-get($offset,size)), 0, $m);

  @if map-get($offset,direction) == left {
    margin-left: grid-size($c,$m);
  } @else {
    margin-right: grid-size($c,$m);
  }
}

Sassdoc read only the first line (@param) the rest is lost. Is there a possible solution for?

Also i had some Mixins, with Vars that holds posible Values like: 'top', 'left', 'bottom', 'right', 'number' and 'bool'. Is it possible to include linebreaks, so the Description is more readable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions