Skip to content

Can't create color swatch sections #35

@mikemccaffrey

Description

@mikemccaffrey

Right now, it seems impossible to create several sections of color swatches on a styleguide page, at least without creating a bunch of extra sub sections.

It looks like the color_grid molecule is called only under two conditions:

  1. The section itself is called color-swatches and the colors are included in the section definition (which precludes subsections)
  2. The final part of the section is color-swatches, which means in order to have sections, you'd need to name them something like 'colors.primary.color-swatches'.

If you follow the second method the styleguide looks like:

image

Ideally, the color swatches would be able to be displayed under the 'primary' subsection, rather than having to tack on an additional 'color-swatches' sub-sub-section.

One possible solution would be to have the color grid called if any part of the section definition contains color-swatches. Then you can have the main section defined as 'color-swatches', and add addition sections by defining them as 'color-swatches.primary'.

It would end up looking like this:

image

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