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

Action for setting a Cover to match dimensions of background media #28387

Open
mtias opened this issue Jan 21, 2021 · 1 comment
Open

Action for setting a Cover to match dimensions of background media #28387

mtias opened this issue Jan 21, 2021 · 1 comment
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.

Comments

@mtias
Copy link
Member

mtias commented Jan 21, 2021

There should be a way to set a Cover block to the same dimensions / aspect ratio of the contained background media.

@mtias mtias added [Type] Enhancement A suggestion for improvement. Needs Design Needs design efforts. [Block] Cover Affects the Cover Block - used to display content laid over a background image labels Jan 21, 2021
@glendaviesnz
Copy link
Contributor

It probably makes sense to defer this until #32502 & #32499 are merged. It should be relatively easily to implement once these are in place as the component already has a ref for the background image and the original image dimensions can be obtained with ref.current.naturalHeight & ref.current.naturalWidth`

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 Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants