[wp-trac] [WordPress Trac] #27376: Gallery Live Preview img width css

WordPress Trac noreply at wordpress.org
Wed Mar 12 14:17:25 UTC 2014


#27376: Gallery Live Preview img width css
-------------------------+---------------------------------
 Reporter:  cramdesign   |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.9
Component:  Editor       |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  ui, administration
-------------------------+---------------------------------
Changes (by SergeyBiryukov):

 * milestone:  Awaiting Review => 3.9


Old description:

> The live preview for galleries uses percentages to define the width of
> .gallery-item. It would be more elegant if .gallery img used:
>
> max-width: 100%;
> height: auto;
>
> Looks like this should be in wp-content.css around line 337.
>
> The widths of gallery-items could also be more precisely set if padding
> were used for separation rather than margin. This would require the use
> of border-box sizing however.
>
> I have these changes tested and they work. A side benefit is that a
> horizontal scrollbar is no longer triggered by the gallery images when
> they overflow.
>
> The captions in galleries with high column counts can get super narrow
> and the type distinctly ugly at narrow sizes but the only fix would be to
> reflow the columns in a responsive fashion and this is not the intent of
> the preview.
>
> I would love to submit a patch but I haven't a clue with svn and barely a
> clue with git.

New description:

 The live preview for galleries uses percentages to define the width of
 .gallery-item. It would be more elegant if .gallery img used:
 {{{
 max-width: 100%;
 height: auto;
 }}}
 Looks like this should be in wp-content.css around line 337.

 The widths of gallery-items could also be more precisely set if padding
 were used for separation rather than margin. This would require the use of
 border-box sizing however.

 I have these changes tested and they work. A side benefit is that a
 horizontal scrollbar is no longer triggered by the gallery images when
 they overflow.

 The captions in galleries with high column counts can get super narrow and
 the type distinctly ugly at narrow sizes but the only fix would be to
 reflow the columns in a responsive fashion and this is not the intent of
 the preview.

 I would love to submit a patch but I haven't a clue with svn and barely a
 clue with git.

--

Comment:

 > I would love to submit a patch but I haven't a clue with svn and barely
 a clue with git.

 Take a look at http://make.wordpress.org/core/handbook/working-with-
 trac/submitting-a-patch/.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27376#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list