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

Sub-pixel scaling browser bug in live preview component #38492

Closed
KevinBatdorf opened this issue Feb 3, 2022 · 2 comments
Closed

Sub-pixel scaling browser bug in live preview component #38492

KevinBatdorf opened this issue Feb 3, 2022 · 2 comments

Comments

@KevinBatdorf
Copy link
Contributor

Description

Both the height and scaling on the live preview component allow sub-pixel values, which may cause browsers to behave unexpectedly.

The sub-pixel height its probably okay but the combination of the height and scaling could be the issue.

Or maybe both could be clamped to a 2 digits?

Step-by-step reproduction instructions

I added an example pattern for a block plugin I'm working on, and added the code via register_block_pattern. It might not be easy to reproduce as in my screencast below, but seeing the sub-pixel values is easy enough to view on any live component.

Screenshots, screen recording, code snippet

Live preview built in 2022 pattern (no rendering issue though):

Screen Shot 2022-02-03 at 10 39 17 AM

Custom pattern added with render issue:

subpixel.scaling.mov

Environment info

2022 theme
Happens in WP 5.9 with and without Gutenberg plugin.

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@annezazu
Copy link
Contributor

Nearly positive this matches this issue which has since been resolved: #38501

Going to close out as a duplicate but thank you for opening and let me know if I somehow missed something causing this to need to remain open.

@KevinBatdorf
Copy link
Contributor Author

Hi @annezazu I'm not sure that's related but I'll check it out and open the issue back up if I'm still seeing it.

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

No branches or pull requests

2 participants