Opened 6 years ago
Last modified 6 years ago
#49333 new defect (bug)
Image on text section of Media & Text block not displaying on front side
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Editor | Keywords: | |
| Focuses: | css, administration | Cc: |
Description
If we enable 'Crop image to fill entire column' option for Media & Text block, Image placed through Image block to the Text section of Media & Text block remains hidden on front end.
Note: See
TracTickets for help on using
tickets.
I just discovered this issue today also and I believe I found the problem. The CSS for this option is being applied to all every figure within the block, not just the one in the media column. The CSS needs to be more specific and use
Two places need changes:
.wp-block-media-text.is-image-fill figure { height: 100%; min-height: 250px; background-size: cover; }and
.wp-block-media-text.is-image-fill figure>img { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }should be:
.wp-block-media-text.is-image-fill figure.wp-block-media-text__media { height: 100%; min-height: 250px; background-size: cover; }and
.wp-block-media-text.is-image-fill figure.wp-block-media-text__media>img { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }