diff --git a/src/wp-content/themes/twentyseventeen/functions.php b/src/wp-content/themes/twentyseventeen/functions.php index f8addc6d6d..b09cf80c77 100644 --- a/src/wp-content/themes/twentyseventeen/functions.php +++ b/src/wp-content/themes/twentyseventeen/functions.php @@ -541,6 +541,24 @@ function twentyseventeen_front_page_template( $template ) { } add_filter( 'frontpage_template', 'twentyseventeen_front_page_template' ); +/** + * Modify tag cloud widget arguments to display all tags in the same font size + * and use list format for better accessibility. + * + * @since Twenty Seventeen 1.4 + * + * @param array $args Arguments for tag cloud widget. + * @return array The filtered arguments for tag cloud widget. + */ +function twentyseventeen_widget_tag_cloud_args( $args ) { + $args['largest'] = 1; + $args['smallest'] = 1; + $args['unit'] = 'em'; + $args['format'] = 'list'; + return $args; +} +add_filter( 'widget_tag_cloud_args', 'twentyseventeen_widget_tag_cloud_args' ); + /** * Implement the Custom Header feature. */ diff --git a/src/wp-content/themes/twentyseventeen/style.css b/src/wp-content/themes/twentyseventeen/style.css index 9fb7cf1101..7fe899bf71 100644 --- a/src/wp-content/themes/twentyseventeen/style.css +++ b/src/wp-content/themes/twentyseventeen/style.css @@ -2540,7 +2540,7 @@ h2.widget-title { padding: 0.5em 0; } -.widget ul li + li { +.widget:not(.widget_tag_cloud) ul li + li { margin-top: -1px; } @@ -2733,6 +2733,14 @@ h2.widget-title { /* Tag cloud widget */ +.tagcloud ul li { + float: left; + border-top: 0; + border-bottom: 0; + padding: 0; + margin: 4px 4px 0 0; +} + .tagcloud, .widget_tag_cloud, .wp_widget_tag_cloud { @@ -2745,12 +2753,8 @@ h2.widget-title { border: 1px solid #ddd; -webkit-box-shadow: none; box-shadow: none; - display: inline-block; - float: left; - font-size: 14px !important; /* !important to overwrite inline styles */ - font-size: 0.875rem !important; - margin: 4px 4px 0 0 !important; - padding: 4px 10px 5px !important; + display: block; + padding: 4px 10px 5px; position: relative; -webkit-transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out; transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;