WordPress / developer-blog-content

In this GitHub space, WordPress team coordinates content to be published on the Developer Blog. Discussions and montly meetings (first Thu - 13:00 UTC) in WP Slack #core-dev-blog
https://developer.wordpress.org/news
40 stars 5 forks source link

Tutorial on aspect ratios in WordPress 6.6 #284

Closed bph closed 3 months ago

bph commented 4 months ago

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: ![image](https://github.com/WordPress/developer-blog-content/assets/1816309/a4e67178-474d-4a68-8d1b-c5306bdf2657) This should be pretty low-hanging fruit in terms of a tutorial.
justintadlock commented 4 months ago

Working on this one here: https://docs.google.com/document/d/1NOB7mGBoPMft7e1MHJA27-uvDAqNNoJiB5K5XZO6HUM/edit?usp=sharing

justintadlock commented 4 months ago

This one is ready for a first review.

marybaum commented 4 months ago

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: @.***>

marybaum commented 4 months ago

Done! Hope you like it as much as I did going through!

justintadlock commented 3 months ago

Thanks, @marybaum! It was nice to get your feedback again.

ryanwelcher commented 3 months ago

Did a quick review @justintadlock and just left a single comment.

justintadlock commented 3 months ago

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/

marybaum commented 3 months ago

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: @.***>