WordPress.org

Make WordPress Core

Ticket #21947: dashCols.patch

File dashCols.patch, 2.2 KB (added by belg4mit, 5 years ago)

Disentangle 3 & 4 column settings, lower size thresholds, allowing user to make best choice for him-/herself

  • wp-admin.

    old new  
    20272027        min-height: 250px;
    20282028}
    20292029
    2030 /* one column on the dash */
    2031 @media only screen and (max-width: 799px) {
     2030/* one column on the dash if width<600px */
     2031@media only screen and (max-width: 599px) {
    20322032        #wpbody-content #dashboard-widgets .postbox-container {
    20332033                width: 100%;
    20342034        }
     
    20402040        }
    20412041}
    20422042
    2043 /* two columns on the dash, but keep the setting if one is selected */
    2044 @media only screen and (min-width: 800px) and (max-width: 1200px) {
    2045         #wpbody-content #dashboard-widgets .postbox-container {
    2046                 width: 49.5%;
    2047         }
    2048 
    2049         #wpbody-content #dashboard-widgets #postbox-container-2,
    2050         #wpbody-content #dashboard-widgets #postbox-container-3,
    2051         #wpbody-content #dashboard-widgets #postbox-container-4 {
    2052                 float: right;
    2053                 width: 50.5%;
    2054         }
    2055 
    2056         #dashboard-widgets #postbox-container-3 .empty-container,
    2057         #dashboard-widgets #postbox-container-4 .empty-container {
    2058                 border: 0 none;
    2059                 height: 0;
    2060                 min-height: 0;
    2061         }
    2062 
     2043/* two or more columns */
     2044@media only screen and (min-width: 600px) {
    20632045        #wpbody #wpbody-content #dashboard-widgets.columns-1 .postbox-container {
    20642046                width: 100%;
    20652047        }
     
    20702052                min-height: 0;
    20712053        }
    20722054
    2073         /* show the radio buttons for column prefs only for one or two columns */
    20742055        .index-php .screen-layout,
    20752056        .index-php .columns-prefs {
    20762057                display: block;
    20772058        }
     2059}
     2060
     2061/* two columns on the dash if <900px */
     2062@media only screen and (min-width: 600px) and (max-width: 899px) {
     2063        #wpbody-content #dashboard-widgets .postbox-container {
     2064                width: 49.5%;
     2065        }
     2066
     2067        #wpbody-content #dashboard-widgets #postbox-container-2 {
     2068                float: right;
     2069                width: 50.5%;
     2070        }
    20782071
     2072        /* show the correct radio buttons */
    20792073        .columns-prefs .columns-prefs-3,
    20802074        .columns-prefs .columns-prefs-4 {
    20812075                display: none;
    20822076        }
    20832077}
    20842078
     2079/* three columns on the dash */
     2080@media only screen and (min-width: 900px) and (max-width: 1200px) {
     2081        /* show the correct radio buttons */
     2082        .columns-prefs .columns-prefs-4 {
     2083                display: none;
     2084        }
     2085}
     2086
     2087/* four columns on the dash, default for >1200px*/
     2088
    20852089/* one column on the post write/edit screen */
    20862090@media only screen and (max-width: 850px) {
    20872091        #wpbody-content #poststuff #post-body {