Support viewport width
I'd expect to be able to assign a viewport width for patterns to display better for themes that register patterns via theme.json, like Twenty Twenty-Four. Even a text control with a number attribute would do fine.
viewportWidth (optional): An integer specifying the intended width of the pattern to allow for a scaled preview of the pattern in the inserter.
What would it take to add viewport width support to patterns? I'm finding this more and more important, as I explore updating the curated patterns on within the patterns directory.
viewportWidth (optional): An integer specifying the intended width of the pattern to allow for a scaled preview of the pattern in the inserter.
You can see the variances between the preview scale (modified with viewport width) and the inserted pattern. It feels unexpected having a different visual representation of the pattern between the preview and the actual inserted pattern:
@ryelle what do we need to do to have this here, and https://github.com/WordPress/pattern-directory/issues/683?
I can set this manually from my sandbox for any patterns that exist right now, if you can give me URLs or IDs. To create a UI for this isn't hard, it's all just a matter of priority. PRs are welcome though, I'd be happy to review 🙂