From 85bce0cc74cc9e070de287aaeebd2e90af0c3502 Mon Sep 17 00:00:00 2001 From: Konstantin Kovshenin Date: Thu, 27 Feb 2014 13:27:00 -0600 Subject: [PATCH 1/2] Add HTML5 support for WordPress galleries. --- functions.php | 7 ++++++- style.css | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index 84af115b..928053f8 100644 --- a/functions.php +++ b/functions.php @@ -55,7 +55,12 @@ function _s_setup() { ) ) ); // Enable support for HTML5 markup. - add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form', ) ); + add_theme_support( 'html5', array( + 'comment-list', + 'search-form', + 'comment-form', + 'gallery', + ) ); } endif; // _s_setup add_action( 'after_setup_theme', '_s_setup' ); diff --git a/style.css b/style.css index 507a99f1..31713e99 100644 --- a/style.css +++ b/style.css @@ -630,7 +630,7 @@ a:active { height: auto; max-width: 90%; } -.site-main .gallery dd { +.site-main .gallery figcaption { margin: 0; } .site-main .gallery-columns-4 .gallery-item { From 9b0ae42c56140fadfca0c0087721e252e47a8ca1 Mon Sep 17 00:00:00 2001 From: Konstantin Kovshenin Date: Thu, 27 Feb 2014 13:42:24 -0600 Subject: [PATCH 2/2] Maintain backwards compatibility for non-HTML5 galleries. --- style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/style.css b/style.css index 31713e99..f2f133aa 100644 --- a/style.css +++ b/style.css @@ -630,6 +630,7 @@ a:active { height: auto; max-width: 90%; } +.site-main .gallery dd, .site-main .gallery figcaption { margin: 0; }