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

Aspect ratio block support: Follow-up tasks #58230

Open
2 of 9 tasks
andrewserong opened this issue Jan 25, 2024 · 2 comments
Open
2 of 9 tasks

Aspect ratio block support: Follow-up tasks #58230

andrewserong opened this issue Jan 25, 2024 · 2 comments
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Enhancement A suggestion for improvement. [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.

Comments

@andrewserong
Copy link
Contributor

andrewserong commented Jan 25, 2024

This is a small issue to track follow-up tasks associated with the aspect ratio block support that landed in #56897.

Short-term To-do

Longer term (for discussion and possibly to open separate issues)

  • See which other blocks can use the block support rather than an ad hoc aspect ratio control — this way the controls are more consistent between blocks, and we can opt other blocks in to using aspect ratio in global styles. For example, what would be involved in converting the Featured Image block to use the block support?
  • Which panel does aspect ratio best belong in? It would ultimately be good for it to be in a consistent place across all blocks.
  • Group Block: Add Aspect Ratio Control #61326
  • Cover block not working when changing the aspect ratio #60224

Tracked elsewhere

@andrewserong andrewserong added [Type] Enhancement A suggestion for improvement. [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues. labels Jan 25, 2024
@eric-michel
Copy link

@andrewserong Could you include this issue in your follow-up tasks list? I see that the Aspect Ratio Control is being folded into a lot of other blocks, including the Group and Image blocks. If inline styles eliminating aspect-ratio start getting added to every Group and Image block even when the control is not used, it would be catastrophic for us.

I am very worried that a future WP update will break large portions of sites we have in production. We use aspect-ratio in our theme CSS to target Cover, Group, and Image blocks regularly. We've already had to fix all of our Cover block aspect ratio CSS, and we use Cover blocks the least out of those three.

@andrewserong
Copy link
Contributor Author

Thanks for calling that out, I've added it to the list. That behaviour was introduced to remove any aspect ratio that might have been set in global styles, and it didn't factor in that themes might be setting aspect-ratio intentionally via a classname.

I currently don't have scope to work on this particular block support right now, but feel free to pick this up if anyone else is interested in contributing in this area. For now, as mentioned in #60922, a workaround would be to ensure that theme CSS that intends to override it has a higher specificity, though I'm aware that's not an ideal long-term solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Enhancement A suggestion for improvement. [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Projects
None yet
Development

No branches or pull requests

2 participants