Opened 7 years ago
Closed 7 years ago
#42101 closed defect (bug) (fixed)
Gallery widget: remove background
Reported by: | melchoyce | Owned by: | melchoyce |
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Widgets | Keywords: | good-first-bug has-patch |
Focuses: | ui | Cc: |
Description
The gallery widget has accidentally inherited the grey background from the image widget. (See screenshot) We should remove it.
Attachments (5)
Change History (22)
#4
@
7 years ago
True. Without the background color, the pictures are looking a little misaligned from the corners.
#6
@
7 years ago
I am not sure because the padding is coming from each side of the image. I will try to work on it to see if I can find an elegant solution.
#7
@
7 years ago
You could just strip any padding here:
.media-widget-gallery-preview .gallery-item
so there will be no borders at all. Looks better at the edges, but doesn't separate the images, see https://core.trac.wordpress.org/ticket/42101#comment:3
#8
follow-up:
↓ 9
@
7 years ago
We definitely want separation between the images, it'd just be nice to have the edges aligned. I know this is a general issue with galleries. If it's not possible to fix, we can just remove the background color and leave the alignment uneven.
#9
in reply to:
↑ 8
@
7 years ago
- Keywords has-patch added; needs-patch removed
Replying to melchoyce:
We definitely want separation between the images, it'd just be nice to have the edges aligned. I know this is a general issue with galleries. If it's not possible to fix, we can just remove the background color and leave the alignment uneven.
It's possible to fix that using a negative margin. I have added a patch.
This ticket was mentioned in Slack in #core by presskopp. View the logs.
7 years ago
#12
@
7 years ago
Tested 42101.2.diff.
When the widget is wider than the thumbnails, there's still spacing around the outside edge of the gallery, but I think that's actually fine. Not sure it's worth trying to be 100% perfect here. Screenshots: https://cloudup.com/cxf6sfOM534
However, I did notice an issue on Firefox, where there's no spacing between the rows: https://cloudup.com/cn_qZ7vakXr
I tried testing in Safari, but for some reason it wouldn't show me the patched version at all. :/ So if someone could test that, I'd appreciate it. Would also appreciate a quick IE check.
#13
@
7 years ago
Here's another patch introducing a margin for firefox. Tested now in Chrome, Firefox & Internet Explorer to be ok, while not shown consistently across the browsers. I made sure the grey background is there when you didn't select an element.
The spacing when you have 2n elements is still there, I found it feasible like this.
Sorry no screenshots.
#14
@
7 years ago
I think the margin-bottom: 5px;
has introduced extra space in Chrome now. Is there maybe a different approach we could take here?
#15
@
7 years ago
You're right, that's why I said it's 'ok', not perfect. My abilities to make a cross browser patch are wearing out, good luck, next one! I'm happy if you didn't find more issues at this point
Heh. I had noticed, but thought this was an intentional change.