[wp-trac] [WordPress Trac] #31029: Allow 0 columns in gallery settings

WordPress Trac noreply at wordpress.org
Thu Jan 15 23:02:39 UTC 2015


#31029: Allow 0 columns in gallery settings
----------------------------+-----------------------------
 Reporter:  afercia         |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Media           |    Version:  4.1
 Severity:  normal          |   Keywords:
  Focuses:  ui, javascript  |
----------------------------+-----------------------------
 Gallery columns "0" is a valid setting and correctly outputs a proper CSS
 class
 `class="gallery galleryid-43 gallery-columns-0 gallery-size-thumbnail">`

 Using that CSS class, as a theme author, I could easily build, for
 example, a grid layout with items displayed inline (or whatever layout
 other than "columns"), overriding just a very few CSS rules.

 I could set `columns="0"` manually, however, each time I'd edit the
 gallery settings through the media views UI, `columns="0"` would be
 removed and it would fallback to the default 3 columns.

 [[Image(https://cldup.com/7zoOccOC1H.png)]]

 I would propose to add and allow a "none" columns setting, with value "0".

 P.S. just noticed: same if I want to add a value higher than "9". Setting
 an arbitrary limit to "9" is an assumption that, as developers, we
 shouldn't do. What if I want, say, 10 images per row?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31029>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list