Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patterns have a different viewport width than the default in core #683

Closed
richtabor opened this issue Apr 23, 2024 · 5 comments · Fixed by #713
Closed

Patterns have a different viewport width than the default in core #683

richtabor opened this issue Apr 23, 2024 · 5 comments · Fixed by #713

Comments

@richtabor
Copy link
Member

Describe the bug

The default viewport width for patterns from the directory is a different value than the default in core.

The visual below is of the same pattern, one from the directory and the other duplicated from it. This test is with using the Assembler theme, but this occurs for any pattern served from the directory.

The scale of patterns served from the directory are zoomed in further, with a smaller viewport width, than the same patterns from on the site.

CleanShot 2024-04-23 at 10 38 25

To Reproduce
Steps to reproduce the behavior:

  1. Add any of the curated patterns from the editor.
  2. Create a pattern from the same exact pattern.
  3. Compare the previews of both patterns.

Expected behavior
The patterns should have the same default scaling, regardless of source.

Additional visual

Here's an example using a core pattern that is already served to WordPress sites:

CleanShot 2024-04-23 at 10 57 04
CleanShot 2024-04-23 at 10 56 08

@richtabor
Copy link
Member Author

While it'd be nice to have to declare viewport width for patterns (#614), we need a consistent default first.

@ryelle
Copy link
Contributor

ryelle commented Apr 23, 2024

I believe the one supplied by the pattern directory is 800px, which did match GB at some point. What is the current gutenberg default?

@richtabor
Copy link
Member Author

Looks like 1200 (source).

@richtabor
Copy link
Member Author

Is this something we can fix?

@richtabor
Copy link
Member Author

We're about to kick up Twenty Twenty Five, which will likely use the directory to house patterns—but I consider this a blocker, as the patterns don't look great coming in with a different viewport width than any included in the theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants