从颜色映射输出 SassDoc 中的色板

Output swatches in SassDoc from a Color Map

我正在尝试通过 SassDoc 在我的 Sass 文档中生成色样。

这适用于单一颜色:

/// Orange
/// @type Color
$orange: #e13400;

是否还有一种方法可以在 SassDoc 中输出彩色地图的样本?

/// Orange tints
/// @type Map
$orange: (
  lightest: #ffe5ca,
  lighter: #f5b180,
  light: #e77636,
  base: #e13400,
  dark: #711f03,
  darker: #581902,
  darkest: #391102,
); 

https://github.com/SassDoc/sassdoc-theme-default/issues/28#issuecomment-76356923

如果您在@prop 定义中重复颜色值,则有可能。

/// Orange tints
/// @group Colors
/// @type Map
/// @prop {Color} lightest [#ffe5ca]
/// @prop {Color} lighter [#f5b180]
/// @prop {Color} light [#e77636]
/// @prop {Color} default [#e13400]
/// @prop {Color} dark [#711f03]
/// @prop {Color} darker [#581902]
/// @prop {Color} darkest [#391102]
$orange: (
  lightest: #ffe5ca,
  lighter: #f5b180,
  light: #e77636,
  default: #e13400,
  dark: #711f03,
  darker: #581902,
  darkest: #391102,
);