Greenshift Image block gets grid item UI controls when within CSS grid container
-
Consider this setup
- Greenshift Container Block (set to CSS Grid) -- Greenshift Container Block (=grid item) --- Greenshift Image Block -- Greenshift Container Block (=grid item) --- Greenshift Image Block -- Greenshift Container Block (=grid item) --- A few native Paragraph Blocks
Problems with this: Some of the image controls (e.g. Scale, Aspect Ratio) work in relation to the Image Block, but not when nested within a grid item.
I’d prefer to simplify the structure to:
- Greenshift Container Block (set to CSS Grid) --- Greenshift Image Block (=grid item) --- Greenshift Image Block (=grid item) -- Greenshift Container Block (=grid item) --- A few native Paragraph Blocks
Con: Currently the Image Block then does not have the Grid Item UI Controls.
Workaround attempt: Image Block → Advanced → Responsive and Custom CSS: Added my various
grid-column/row-*
attributes as needed.- ? Works fine in Frontend.
- ? Fails in block editor as the Block Editor inserts intermediary UI DIVs during runtime, so the image block is then technically not a child of the grid-container, but a grand-grand-child, hence it does not behave as desired. So no WYSIWYG editing then.
Proposal: When a Greenshift Image Block is nested inside a Greenshift Grid Container it gets the grid-item specific UI controls. Benefits:
- Less Nesting!
- You get grid item controls plus the genuine image block specific controls, which should then work correctly in combination, as some of the image controls like scale and aspect ratio work only correct in relation to itself (figure to img element) but which don’t work when nested within a grid item.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Greenshift Image block gets grid item UI controls when within CSS grid container’ is closed to new replies.