Skip to content

Commit 57ea319

Browse files
committed
Editor: Add support for select elements to theme.json.
Adds support for the select element in theme.json so that theme builders and extenders can be style select elements consistently. We are targeting the select HTML element rather than adding a CSS class, as we do for other elements that theme.json supports. This commit adds no extra styling unless a theme opts in to use this and the specificity of any generated CSS with the element is 0. See original Gutenberg PR: WordPress/gutenberg#70379. Example usage: {{{ "elements": { "select": { "color": { "text": "red", "background": "blue" } } } }}} Props onemaggie, joen, get_dave, wildworks, ocean90, mikachan, poena, SirLouen, tusharbharti, yashjawale, abcd95. Fixes #63555. See #63878. Built from https://develop.svn.wordpress.org/trunk@61031 git-svn-id: https://core.svn.wordpress.org/trunk@60367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 7bb6f0a commit 57ea319

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

wp-includes/class-wp-theme-json.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,7 @@ class WP_Theme_JSON {
629629
// The block classes are necessary to target older content that won't use the new class names.
630630
'caption' => '.wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption',
631631
'cite' => 'cite',
632+
'select' => 'select',
632633
);
633634

634635
const __EXPERIMENTAL_ELEMENT_CLASS_NAMES = array(

wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @global string $wp_version
1818
*/
19-
$wp_version = '6.9-alpha-61030';
19+
$wp_version = '6.9-alpha-61031';
2020

2121
/**
2222
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)