Make WordPress Core

Opened 4 years ago

Last modified 2 months ago

#52716 assigned defect (bug)

Twenty Seventeen: consider style updates for box-shadow on linked images

Reported by: presstoke's profile presstoke Owned by:
Milestone: Future Release Priority: normal
Severity: minor Version: 5.0
Component: Bundled Theme Keywords: has-patch needs-refresh
Focuses: css Cc:

Description

Origin

User report: https://github.com/WordPress/gutenberg/issues/22187

That report was only about the Media & Text block specifically but looking into I recognized it as a general issue with the styles from Twenty Seventeen and applicable to other blocks.

Steps to replicate

  1. Add any block that supports inner blocks and background colors (Group, Columns)
  2. Add a background color to the block
  3. Inside the block, add any/all of the following blocks: Image, Gallery or Media & Text
  4. Add a link to the inner block (Gallery block gets links via a setting the Inspector (block settings sidebar)

Results

  • In each block there is a box-shadow on the images
  • In the Gallery block the box-shadows double-up between images
  • In a Media & Text block with a background-color of its own, the box-shadow expands beyond the block background area

Expected

Consistency between what is seen in the Block Editor and the frontend (i.e. Either without box-shadows on the frontend or with box-shadows in the Editor).

Screenshots

Blocks with linked images

Block editor Frontend
image pending image pending

Inline images are also styled differently between editor/frontend.

Block editor Frontend
image pending image pending

Attachments (6)

T17-editor-linked-images-blocks.png (134.5 KB) - added by presstoke 4 years ago.
T17-frontend-linked-images-blocks.png (293.8 KB) - added by presstoke 4 years ago.
T17-editor-linked-images-inline.png (6.6 KB) - added by presstoke 4 years ago.
T17-frontend-linked-images-inline.png (7.4 KB) - added by presstoke 4 years ago.
Screenshot_2021-03-08 #52716 – WordPress Develop.png (2.1 MB) - added by justinahinon 4 years ago.
SCR-20240708-lfqy.jpeg (235.1 KB) - added by karmatosed 2 months ago.

Change History (17)

#1 @presstoke
4 years ago

I expected to be able to edit my ticket after creation to insert the attached files but seems I cannot so I'll do so here:

Blocks with linked images

Block editor Frontend

Inline images are also styled differently between editor/frontend.

Block editor Frontend

#2 @justinahinon
4 years ago

  • Focuses css added
  • Owner set to justinahinon
  • Severity changed from normal to minor
  • Status changed from new to assigned
  • Version set to trunk

Hello @presstoke. Thank you for reporting the issue.

I can effectively reproduce this issue on Twenty Seventeen, with the all blocks that includes an image. On a fresh WordPress trunk installation with or without Gutenberg activated.

However, I think that this is not related to the Group/Column blocks.

When you change a page background to a non-white color, and add an image with a link, you'll still notice the same issue. See https://core.trac.wordpress.org/attachment/ticket/52716/Screenshot_2021-03-08%20%2352716%20%E2%80%93%20WordPress%20Develop.png.

I am working on a fix for that.

Version 1, edited 4 years ago by justinahinon (previous) (next) (diff)

This ticket was mentioned in PR #1078 on WordPress/wordpress-develop by JustinyAhin.


4 years ago
#3

  • Keywords has-patch added

#4 @justinahinon
4 years ago

  • Keywords needs-testing added

This ticket was mentioned in Slack in #core by metalandcoffee. View the logs.


4 years ago

#6 @hellofromTonya
4 years ago

  • Version changed from trunk to 5.0

Updating the version to 5.0, which is when styles were introduced in #45045 [44148].

stokesman commented on PR #1078:


4 years ago
#7

👍 the simplest possible solution.

This ticket was mentioned in Slack in #core-css by ryelle. View the logs.


3 years ago

#9 @karmatosed
3 months ago

  • Milestone changed from Awaiting Review to Future Release

#10 @karmatosed
2 months ago

  • Owner changed from justinahinon to karmatosed

#11 @karmatosed
2 months ago

  • Keywords needs-refresh added; needs-testing removed
  • Owner karmatosed deleted

The following is true currently when testing the latest patch:

Without patch

  • It only shows the border/shadow within the editor on gallery.
  • If you want to see the border/shadow you can using the group and gallery blocks.

With patch

  • No change is improved as shown with screenshot.

I would suggest the patch needs reviewing and iteration.

Note: See TracTickets for help on using tickets.