ui_patterns
ui_patterns copied to clipboard
Allow per pattern preview styling
Problem
When previewing our patterns, we sometime need to style their wrapper so they look more like they will in their final context (eg. some pattern that is going to be in an area that have a max width).
Solution
It would be interesting to add the pattern ID to the preview wrapper (eg. pattern-preview__preview--my-pattern
or pattern-preview--my-pattern__preview
) so we could apply some specific styling to this wrapper in case we need it for our preview.