Tutorial on aspect ratios in WordPress 6.6
Discussed in https://github.com/WordPress/developer-blog-content/discussions/281
Originally posted by justintadlock July 2, 2024 This is a new feature landing in WordPress 6.6 for theme authors: https://make.wordpress.org/core/2024/06/24/miscellaneous-editor-changes-in-wordpress-6-6/#Add-custom-Aspect-Ratio-presets-through-theme-json
I propose a simple walkthrough tutorial of how to implement custom aspect ratios via theme.json or theme style variations. The tutorial could even include they can be used in patterns/templates. This feature allows users to use these aspect ratios with blocks that support them, such as Image, Featured Image, and Cover. _Note that wide/full Image blocks do not currently support setting an aspect ratio.
Example of custom ratios as shown in the editor:
This should be pretty low-hanging fruit in terms of a tutorial.
Working on this one here: https://docs.google.com/document/d/1NOB7mGBoPMft7e1MHJA27-uvDAqNNoJiB5K5XZO6HUM/edit?usp=sharing
This one is ready for a first review.
I can do that tomorrow!... from my phoneOn Jul 23, 2024, at 4:43 PM, Justin Tadlock @.***> wrote: This one is ready for a first review.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
Done! Hope you like it as much as I did going through!
Thanks, @marybaum! It was nice to get your feedback again.
Did a quick review @justintadlock and just left a single comment.
Social Copy:
WordPress 6.6 introduced support for custom aspect ratios. Learn how to register your own via theme.json:
https://developer.wordpress.org/news/2024/08/05/registering-custom-aspect-ratios-in-wordpress-6-6/
You are most welcome! It was fun to do.When I’m better I hope to be around more. On Aug 5, 2024, at 11:46 AM, Justin Tadlock @.***> wrote: Thanks, @marybaum! It was nice to get your feedback again.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>