-
Notifications
You must be signed in to change notification settings - Fork 106
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
Accurate sizes: Disable layout calculations for classic themes #1744
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
That makes sense because classic themes won't have a layout setting for this value. We could consider making a default guess, but disabling for now is probably sensable. |
@mukeshpanchal27 @joemcgill This PR looks good to me, though a related question: Do we already have an issue to explore adding a way to define those widths for classic themes? |
@felixarntz creating an API for defining layout values in classic themes is listed in the todo list for #760, but we've not yet created an issue for this yet. I wanted us to explore the implementation in the block theme context first before starting to define what that API should look like. |
Summary
This PR Checks the functionality of the image block in classic themes. After merging #1738, the
sizes
attribute for the classic theme has been producing incorrect values.Issue Example:
When selecting the
wide
alignment for an image block, thesizes
attribute is rendered as:sizes="(max-width: ) 100vw, "
, This is incorrect. The expected output should be:sizes="(max-width: 1024px) 100vw, 1024px"
This PR aims to fix this issue and ensure the
sizes
attribute is generated correctly for classic themes.Steps to reproduce the issue
wide
alignment