| | 1 | This PR adds a new class that can be used by themers and extenders to style selects or dropdown elements. Right now the experimental form block doesn't have dropdowns in it, but many extenders do, so I wanted to cover them too in line with the work being done at https://github.com/WordPress/gutenberg/pull/70378/ |
| | 2 | |
| | 3 | We are adding a new class wp-element-select the same way we do for the button element, since it's less disruptive than styling the select element directly and can be slowly adopted by plugins as they see fit |
| | 4 | |
| | 5 | This one is a little hard to test without having a native block that has a dropdown in it. What I did was: |
| | 6 | |
| | 7 | 1. alter a third party block to have the wp-element-select class. |
| | 8 | 2. added the following to my theme.json file: |
| | 9 | |
| | 10 | {{{ |
| | 11 | |
| | 12 | "elements": { |
| | 13 | "select": { |
| | 14 | "color": { |
| | 15 | "text": "red", |
| | 16 | "background": "blue" |
| | 17 | } |
| | 18 | }, |
| | 19 | } |
| | 20 | |
| | 21 | }}} |
| | 22 | |
| | 23 | |