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

Cover block: Enable focal point picker for fixed background #52898

Open
JosVelasco opened this issue Jul 24, 2023 · 2 comments
Open

Cover block: Enable focal point picker for fixed background #52898

JosVelasco opened this issue Jul 24, 2023 · 2 comments
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Type] Enhancement A suggestion for improvement.

Comments

@JosVelasco
Copy link

What problem does this address?

The focal point picker disappears when you activate the fixed background toggle in the Media settings.

What is your proposed solution?

I understand it doesn't make much sense for desktop to preserve this setting, but for mobile, it could be fantastic to use this UI to deal with backgrounds converted from fixed to scroll, to select more relevant parts of the image.

@mrfoxtalbot mrfoxtalbot added [Type] Enhancement A suggestion for improvement. [Block] Cover Affects the Cover Block - used to display content laid over a background image labels Jul 24, 2023
@t-hamano
Copy link
Contributor

Thanks for the suggestion.

Personally, I think it's fine to always enable the focal point picker UI (background-position) regardless of whether the fixed background setting (background-attachment: fixed) is enabled. For example, for background image support, we can use the focal picker even when the fixed background is enabled:

Image

This is also useful on other platforms, such as iOS, that don't support the fixed background, because we can still use the focal picker to adjust the horizontal or vertical position even when the fixed background is enabled.

In the video below, the focal point picker is operated while the fixed background is enabled in a Group block that supports the background image:

6a054ed0eba2dd4eea1735f190768da8.mp4

cc @WordPress/gutenberg-design @ramonjd

@ramonjd
Copy link
Member

ramonjd commented Nov 24, 2024

Sounds like a good idea. It might be good to also keep @ajlende in the loop. The Cover block resets the background-position value to background-position: 50% 50%; when you toggle the fixed background, and it looks like this is related to a couple of Duotone bug fixes (?)

The latter relates to parallex, but I'm not sure how to enable that setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants