Accurate sizes: Disable layout calculations for classic themes#1744
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
sizesattribute for the classic theme has been producing incorrect values.Issue Example:
When selecting the
widealignment for an image block, thesizesattribute 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
sizesattribute is generated correctly for classic themes.Steps to reproduce the issue
widealignment