WordPress.org

Make WordPress Core

#26354 closed defect (bug) (fixed)

Dashboard responsive columns don't work correctly when you set a specific number of columns.

Reported by: westi Owned by: nacin
Milestone: 3.8 Priority: lowest
Severity: trivial Version: 3.8
Component: Administration Keywords: needs-patch has-patch
Focuses: Cc:

Description

We have CSS that supports specific numbers of columns of dashboard widgets as well as responsive ones.

However if you use wp_dashboard and related APIs to create your own page of widgets in a plugin with a fixed number or selectable number of columns we never output the css classes that disable the responsive CSS.

Also the CSS for the unresponsive fixed columns is very crowded and loses the separation between the columns.

Attachments (3)

26354-php.diff (686 bytes) - added by westi 21 months ago.
Simple patch to output the class the CSS supports
26254-php.2.diff (686 bytes) - added by westi 21 months ago.
A patch with proper CSS usage, thanks to kovshenin for pointing out my stupidity
26354.diff (1.6 KB) - added by kovshenin 21 months ago.

Download all attachments as: .zip

Change History (9)

@westi21 months ago

Simple patch to output the class the CSS supports

comment:1 @westi21 months ago

That patch makes 2 column mode work on a wide screen for me when I have a plugin that uses wp_dashboard() and has a 1/2 column toggle in screen options.

CSS needs some work though so there is still separation between the columns.

@westi21 months ago

A patch with proper CSS usage, thanks to kovshenin for pointing out my stupidity

comment:2 @nacin21 months ago

  • Priority changed from normal to lowest
  • Severity changed from normal to trivial

I don't know if we should be supporting wp_dashboard() being used in a plugin.

comment:3 @nacin21 months ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 26617:

Include columns-# CSS class in wp_dashboard() for when the screen supports it.

props westi.
fixes #26354.

@kovshenin21 months ago

comment:4 @kovshenin21 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

In 26354.diff: use more specific CSS selectors to target metabox containers with the columns screen setting, otherwise they're pretty useless with our responsive dash media queries.

comment:5 @nacin21 months ago

Seems like all of this CSS (and [26617]) should just be removed outright, no?

comment:6 @nacin21 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 26756:

Proper CSS specificity for columns-based dashboard grids.

props kovshenin.
fixes #26354.

Note: See TracTickets for help on using tickets.