From 2b2f309d6f59603b8e46d1fdc0d35673efcec85d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 10 May 2021 14:54:57 +0000 Subject: [PATCH] Site Health: Improve the appearance of Site Health Status dashboard widget. This better utilizes the available screen space on wider screens. Props mblach, hedgefield, Clorith. Fixes #52966. git-svn-id: https://develop.svn.wordpress.org/trunk@50833 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/site-health.css | 26 ++++++++- src/wp-admin/includes/dashboard.php | 84 +++++++++++++++-------------- 2 files changed, 68 insertions(+), 42 deletions(-) diff --git a/src/wp-admin/css/site-health.css b/src/wp-admin/css/site-health.css index 7a67525a85..497393fc48 100644 --- a/src/wp-admin/css/site-health.css +++ b/src/wp-admin/css/site-health.css @@ -30,10 +30,15 @@ } .health-check-title-section { + clear: both; + text-align: center; + padding-top: 8px; +} + +.site-health .health-check-title-section { display: flex; align-items: center; justify-content: center; - clear: both; } .site-health-progress-wrapper { @@ -458,6 +463,25 @@ flex-shrink: 0; } +/* Styling unique to the dashboard widget. */ +#dashboard_site_health .site-health-details { + padding-left: 16px; +} + +#dashboard_site_health .inside { + display: grid; + grid-template-columns: 1fr 2fr; + grid-auto-rows: minmax(64px, auto); + column-gap: 16px; + align-items: center; +} + +@media screen and (max-width: 480px) { + #dashboard_site_health .inside { + grid-template-columns: 100%; + } +} + @media screen and (max-width: 782px) { .health-check-body { margin: 0 12px; diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index 8eab74713e..c20bb5db6b 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -1907,48 +1907,50 @@ function wp_dashboard_site_health() { - -

- visit the Site Health screen to gather information about your site now.' ), - esc_url( admin_url( 'site-health.php' ) ) - ); - ?> -

- -

- - - - - 1 ) : ?> - - - - - - -

- +
+ +

+ visit the Site Health screen to gather information about your site now.' ), + esc_url( admin_url( 'site-health.php' ) ) + ); + ?> +

+ +

+ + + + + 1 ) : ?> + + + + + + +

+ - 0 && false !== $get_issues ) : ?> -

- %1$d item on the Site Health screen.', - 'Take a look at the %1$d items on the Site Health screen.', - $issues_total - ), - $issues_total, - esc_url( admin_url( 'site-health.php' ) ) - ); - ?> -

- + 0 && false !== $get_issues ) : ?> +

+ %1$d item on the Site Health screen.', + 'Take a look at the %1$d items on the Site Health screen.', + $issues_total + ), + $issues_total, + esc_url( admin_url( 'site-health.php' ) ) + ); + ?> +

+ +