Background block support #38119
Replies: 5 comments 2 replies
-
Great thoughts, and the prospects of expanding background support are exciting. This may be one of those situations that need some visual explorations to help inform the path forward, before the technical structure can be fully described. For example, I could imagine a future where multiple backgrounds can be applied, each added to its own layer in an It might not be a near term thing, and the idea would need to be validated by mockups. But if the concept proved compelling it could possibly help inform the structure. |
Beta Was this translation helpful? Give feedback.
-
Hey, it's great that you thought about how it'd fit overall and how can be expanded. We can create this new support feature by leaving the existing color.background where it is, so it's fewer things to worry about for a start. If there's a desire to move it, we can migrate it later to a new section. We can use something like |
Beta Was this translation helpful? Give feedback.
-
I have been receiving support requests asking how to add a body background image to block themes, without the customizer. A feature where you can select a background image that is applied to the website is missing. |
Beta Was this translation helpful? Give feedback.
-
Thank you for adding this discussion Glen @glendaviesnz ! I am going to add in various issues I found to bring in some perspectives of pieces of the background block puzzle. Add Youtube or similar video service using an embed URL in the background of the Cover block Specify a color palette is to be used for background colors only (or text colors only) Btw here is a site I have built a bunch of years ago. Consider adding the ability to have multiple background images Moving background tools for the Cover block from the Block Inspector to the Toolbar + extending background tools to Cover/Group blocks Action for setting a Cover to match dimensions of background media Allow using featured image as background for a group block I will stop it there. As the above is plenty of background related issues. Actually I am going to add in a bug which has to do with the Ipad and Safari. (Adding it in here because of background controls in relation to different devices that we use.) #17718 |
Beta Was this translation helpful? Give feedback.
-
Just a quick thought I had last night about how we might store the attributes for a background support. Wherever it sits in the hierarchy, perhaps instead of a whole So, in
Then in the
One potential benefit of starting with a parent level |
Beta Was this translation helpful? Give feedback.
-
This issue outlines a desire to rationalise the background options across blocks and group them together in a Background panel.
As this issue states “Right now it's possible to add video backgrounds, coloured overlays, etc, to the Cover block alone. It'd make sense to extract this and extend it to other container blocks (group and columns, for example) as well as expanding the features”.
A new block support seems like the obvious way to handle this, eg.
However, those of you familiar with the existing block supports will realise that there is an awkward crossover between the existing ‘colors’ support, which provides a ‘background’ option to which can be assigned color or gradient.
We could add ‘media’ as an option to the existing colors background support, but a video and an image aren’t really a color, and if we have a background support that only includes media options and not color it might be confusing.
There are a few different approaches we could take, eg.
Leave background color/gradient where they are in colors, and add the media options in new background support. The Cover block already has the background color and background media appearing in different settings panels.
Make both block supports aware of each other such that if the newer backgrounds support is enabled, display the background color options in a new background UI panel combined with the media options instead of with colors. If the newer backgrounds support isn’t enabled, keep the background color/gradient where it is.
Completely move the background color/gradient to a new background support.
Combine background and colors support/panel under some new name
Does anyone have any thoughts on how to best handle the addition of block support for background media in terms of both the underlying data location and the UI?
@aaronrobertshaw, @andrewserong, @apeatling, @ramonjd, @stacimc, @karmatosed, @oandregal, @kjellr, @youknowriad, @jasmussen, @mtias , @shaunandrews
Beta Was this translation helpful? Give feedback.
All reactions